'Check whether a course mode is displayed.'

def _assert_displayed_mode(self, response, expected_mode):

    response_dict = self._get_page_data(response)
    self.assertEqual(response_dict['course_mode_slug'], expected_mode)
