Files
edx-platform/common/test/acceptance/pages/lms/catalog.py
Renzo Lucioni 78a9b1f0ae Remove use of read_cached_programs switch
The read_cached_programs switch was used to control the release of changes for reading programs exclusively from the cache. With those changes stable, the switch is no longer necessary.

LEARNER-382
2017-05-12 11:06:08 -04:00

23 lines
688 B
Python

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