Files
edx-platform/common/test/acceptance/pages/lms/catalog.py
Michael Youngstrom 872cddedbf INCR
2019-04-29 09:37:44 -04:00

28 lines
756 B
Python

"""
Course catalog page
"""
from __future__ import absolute_import
import re
from bok_choy.page_object import PageObject
from common.test.acceptance.pages.lms import BASE_URL
class CacheProgramsPage(PageObject):
"""
Visit this page to call the cache_programs management command.
This page makes a GET request to a view which is only meant to be enabled in
testing contexts where the LMS can only be reached over HTTP. Stub the
discovery service before visiting this page.
"""
url = BASE_URL + '/catalog/management/cache_programs/'
def is_browser_on_page(self):
body = self.q(css='body').text[0]
match = re.search(r'programs cached', body, flags=re.IGNORECASE)
return True if match else False