|
35 | 35 | from openedx.core.djangoapps.content.course_overviews.models import CourseOverview |
36 | 36 | from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory |
37 | 37 | from openedx.core.djangoapps.waffle_utils.testutils import WAFFLE_TABLES |
38 | | -from openedx.core.djangolib.testing.utils import AUTHZ_TABLES |
39 | 38 | from xmodule.modulestore import ModuleStoreEnum # lint-amnesty, pylint: disable=wrong-import-order |
40 | 39 | from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order |
41 | 40 | from xmodule.modulestore.tests.factories import CourseFactory # lint-amnesty, pylint: disable=wrong-import-order |
42 | 41 |
|
43 | 42 | TOTAL_COURSES_COUNT = 10 |
44 | 43 | USER_COURSES_COUNT = 1 |
45 | 44 |
|
46 | | -QUERY_COUNT_TABLE_IGNORELIST = WAFFLE_TABLES + AUTHZ_TABLES |
47 | | - |
48 | 45 |
|
49 | 46 | @ddt.ddt |
50 | 47 | class TestCourseListing(ModuleStoreTestCase): |
@@ -306,10 +303,10 @@ def test_course_listing_performance(self): |
306 | 303 | courses_list, __ = _accessible_courses_list_from_groups(self.request) |
307 | 304 | self.assertEqual(len(courses_list), USER_COURSES_COUNT) |
308 | 305 |
|
309 | | - with self.assertNumQueries(2, table_ignorelist=QUERY_COUNT_TABLE_IGNORELIST): |
| 306 | + with self.assertNumQueries(1, table_ignorelist=WAFFLE_TABLES): |
310 | 307 | _accessible_courses_list_from_groups(self.request) |
311 | 308 |
|
312 | | - with self.assertNumQueries(2, table_ignorelist=QUERY_COUNT_TABLE_IGNORELIST): |
| 309 | + with self.assertNumQueries(2, table_ignorelist=WAFFLE_TABLES): |
313 | 310 | _accessible_courses_iter_for_tests(self.request) |
314 | 311 |
|
315 | 312 | def test_course_listing_errored_deleted_courses(self): |
|
0 commit comments