'Asserts that the Course Discovery UI elements follow the
feature flag settings'

@patch('student.views.render_to_response', RENDER_MOCK)
@patch('courseware.views.views.render_to_response', RENDER_MOCK)
@patch.dict('django.conf.settings.FEATURES', {'ENABLE_COURSE_DISCOVERY': False})
def test_course_discovery_off(self):

    response = self.client.get('/')
    self.assertEqual(response.status_code, 200)
    self.assertNotIn('Search    for    a    course', response.content)
    response = self.client.get(reverse('branding.views.courses'))
    self.assertEqual(response.status_code, 200)
    self.assertNotIn('Search    for    a    course', response.content)
    self.assertNotIn('<aside    aria-label="Refine    Your    Search"    class="search-facets    phone-menu">', response.content)
    self.assertIn('<div    class="courses    no-course-discovery"', response.content)
