From 17a6cfee70d0fe040fe92ea5bf6c23fee8181f64 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Tue, 3 Mar 2015 16:59:42 -0500 Subject: [PATCH] Update query counts to new reality --- .../courseware/tests/test_module_render.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lms/djangoapps/courseware/tests/test_module_render.py b/lms/djangoapps/courseware/tests/test_module_render.py index f7e31981d0..0cde4ed324 100644 --- a/lms/djangoapps/courseware/tests/test_module_render.py +++ b/lms/djangoapps/courseware/tests/test_module_render.py @@ -457,11 +457,11 @@ class TestTOC(ModuleStoreTestCase): # Split makes 6 queries to load the course to depth 2: # - load the structure # - load 5 definitions - # Split makes 2 queries to render the toc: + # Split makes 6 queries to render the toc: # - it loads the active version at the start of the bulk operation - # - it loads the course definition for inheritance, because it's outside - # the bulk-operation marker that loaded the course descriptor - @ddt.data((ModuleStoreEnum.Type.mongo, 3, 0, 0), (ModuleStoreEnum.Type.split, 6, 0, 2)) + # - it loads 5 definitions, because it instantiates the a CourseModule and 4 VideoModules + # each of which access a Scope.content field in __init__ + @ddt.data((ModuleStoreEnum.Type.mongo, 3, 0, 0), (ModuleStoreEnum.Type.split, 6, 0, 6)) @ddt.unpack def test_toc_toy_from_chapter(self, default_ms, setup_finds, setup_sends, toc_finds): with self.store.default_store(default_ms): @@ -497,9 +497,9 @@ class TestTOC(ModuleStoreTestCase): # - load 5 definitions # Split makes 2 queries to render the toc: # - it loads the active version at the start of the bulk operation - # - it loads the course definition for inheritance, because it's outside - # the bulk-operation marker that loaded the course descriptor - @ddt.data((ModuleStoreEnum.Type.mongo, 3, 0, 0), (ModuleStoreEnum.Type.split, 6, 0, 2)) + # - it loads 5 definitions, because it instantiates the a CourseModule and 4 VideoModules + # each of which access a Scope.content field in __init__ + @ddt.data((ModuleStoreEnum.Type.mongo, 3, 0, 0), (ModuleStoreEnum.Type.split, 6, 0, 6)) @ddt.unpack def test_toc_toy_from_section(self, default_ms, setup_finds, setup_sends, toc_finds): with self.store.default_store(default_ms):