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
23 lines
688 B
Python
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
|