From 805bf28748ecae4222682cda645d205362fa5c43 Mon Sep 17 00:00:00 2001 From: Nimisha Asthagiri Date: Sun, 11 Sep 2016 00:44:48 -0400 Subject: [PATCH] Disable persistent-grades for tests failing query counts, until TNL-5458 --- lms/djangoapps/ccx/tests/test_field_override_performance.py | 1 + lms/djangoapps/courseware/tests/test_views.py | 2 ++ lms/djangoapps/instructor_task/tests/test_tasks_helper.py | 2 ++ 3 files changed, 5 insertions(+) diff --git a/lms/djangoapps/ccx/tests/test_field_override_performance.py b/lms/djangoapps/ccx/tests/test_field_override_performance.py index faf2bfa01d..0a16cf0d59 100644 --- a/lms/djangoapps/ccx/tests/test_field_override_performance.py +++ b/lms/djangoapps/ccx/tests/test_field_override_performance.py @@ -36,6 +36,7 @@ from openedx.core.djangoapps.content.block_structure.api import get_course_in_ca 'django.conf.settings.FEATURES', { 'ENABLE_XBLOCK_VIEW_ENDPOINT': True, + 'PERSISTENT_GRADES_ENABLED_FOR_ALL_TESTS': False # disable persistent grades until TNL-5458 (reduces queries) } ) @ddt.ddt diff --git a/lms/djangoapps/courseware/tests/test_views.py b/lms/djangoapps/courseware/tests/test_views.py index e5088f7441..02fcd58ab0 100644 --- a/lms/djangoapps/courseware/tests/test_views.py +++ b/lms/djangoapps/courseware/tests/test_views.py @@ -1345,6 +1345,8 @@ class ProgressPageTests(ModuleStoreTestCase): ) self.assertContains(resp, u"Download Your Certificate") + # disable persistent grades until TNL-5458 (reduces query counts) + @patch.dict(settings.FEATURES, {'PERSISTENT_GRADES_ENABLED_FOR_ALL_TESTS': False}) @ddt.data( *itertools.product(((39, 4, True), (39, 4, False)), (True, False)) ) diff --git a/lms/djangoapps/instructor_task/tests/test_tasks_helper.py b/lms/djangoapps/instructor_task/tests/test_tasks_helper.py index d9907ae012..b6d6fad3c3 100644 --- a/lms/djangoapps/instructor_task/tests/test_tasks_helper.py +++ b/lms/djangoapps/instructor_task/tests/test_tasks_helper.py @@ -1641,6 +1641,8 @@ class TestCertificateGeneration(InstructorTaskModuleTestCase): super(TestCertificateGeneration, self).setUp() self.initialize_course() + # disable persistent grades until TNL-5458 (reduces query counts) + @patch.dict(settings.FEATURES, {'PERSISTENT_GRADES_ENABLED_FOR_ALL_TESTS': False}) def test_certificate_generation_for_students(self): """ Verify that certificates generated for all eligible students enrolled in a course.