|
10 | 10 | import ddt |
11 | 11 | import pytz |
12 | 12 | from django.core.exceptions import PermissionDenied |
13 | | -from django.test.utils import override_settings |
14 | 13 | from django.utils.translation import gettext as _ |
15 | | -from edx_toggles.toggles.testutils import override_waffle_flag |
16 | 14 | from search.api import perform_search |
17 | 15 |
|
18 | | -from cms.djangoapps.contentstore import toggles |
19 | 16 | from cms.djangoapps.contentstore.courseware_index import CoursewareSearchIndexer, SearchIndexingError |
20 | 17 | from cms.djangoapps.contentstore.tests.utils import CourseTestCase |
21 | 18 | from cms.djangoapps.contentstore.utils import ( |
22 | | - get_proctored_exam_settings_url, |
23 | 19 | reverse_course_url, |
24 | 20 | reverse_usage_url |
25 | 21 | ) |
|
34 | 30 | from cms.djangoapps.contentstore.xblock_storage_handlers.view_handlers import VisibilityState, create_xblock_info |
35 | 31 |
|
36 | 32 |
|
37 | | -@override_waffle_flag(toggles.LEGACY_STUDIO_COURSE_OUTLINE, True) |
38 | 33 | @ddt.ddt |
39 | 34 | class TestCourseOutline(CourseTestCase): |
40 | 35 | """ |
@@ -226,38 +221,15 @@ def test_verify_warn_only_on_enabled_blocks(self, enabled_block_types, deprecate |
226 | 221 | expected_block_types |
227 | 222 | ) |
228 | 223 |
|
229 | | - @override_settings(FEATURES={'ENABLE_EXAM_SETTINGS_HTML_VIEW': True}) |
230 | | - @mock.patch('cms.djangoapps.models.settings.course_metadata.CourseMetadata.validate_proctoring_settings') |
231 | | - def test_proctoring_link_is_visible(self, mock_validate_proctoring_settings): |
232 | | - """ |
233 | | - Test to check proctored exam settings mfe url is rendering properly |
234 | | - """ |
235 | | - mock_validate_proctoring_settings.return_value = [ |
236 | | - { |
237 | | - 'key': 'proctoring_provider', |
238 | | - 'message': 'error message', |
239 | | - 'model': {'display_name': 'proctoring_provider'} |
240 | | - }, |
241 | | - { |
242 | | - 'key': 'proctoring_provider', |
243 | | - 'message': 'error message', |
244 | | - 'model': {'display_name': 'proctoring_provider'} |
245 | | - } |
246 | | - ] |
247 | | - response = self.client.get_html(reverse_course_url('course_handler', self.course.id)) |
248 | | - proctored_exam_settings_url = get_proctored_exam_settings_url(self.course.id) |
249 | | - self.assertContains(response, proctored_exam_settings_url, 2) |
250 | | - |
251 | 224 | def test_number_of_calls_to_db(self): |
252 | 225 | """ |
253 | 226 | Test to check number of queries made to mysql and mongo |
254 | 227 | """ |
255 | | - with self.assertNumQueries(39, table_ignorelist=WAFFLE_TABLES): |
| 228 | + with self.assertNumQueries(21, table_ignorelist=WAFFLE_TABLES): |
256 | 229 | with check_mongo_calls(3): |
257 | | - self.client.get_html(reverse_course_url('course_handler', self.course.id)) |
| 230 | + self.client.get(reverse_course_url('course_handler', self.course.id), content_type="application/json") |
258 | 231 |
|
259 | 232 |
|
260 | | -@override_waffle_flag(toggles.LEGACY_STUDIO_COURSE_OUTLINE, True) |
261 | 233 | class TestCourseReIndex(CourseTestCase): |
262 | 234 | """ |
263 | 235 | Unit tests for the course outline. |
|
0 commit comments