Files
edx-platform/common/test/acceptance/pages/lms/catalog.py
Feanil Patel 9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00

28 lines
718 B
Python

"""
Course catalog page
"""
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