Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
2a4a89a9
Commit
2a4a89a9
authored
Feb 12, 2015
by
John Eskew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add course traversal mongo call count for old Mongo.
parent
28e1ecc5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
common/lib/xmodule/xmodule/modulestore/tests/test_mongo_call_count.py
+6
-4
No files found.
common/lib/xmodule/xmodule/modulestore/tests/test_mongo_call_count.py
View file @
2a4a89a9
...
...
@@ -87,12 +87,14 @@ class CountMongoCallsCourseTraversal(TestCase):
"""
@ddt.data
(
(
None
,
7
),
# The way this traversal *should* be done.
(
0
,
145
)
# The pathological case - do *not* query a course this way!
(
MIXED_OLD_MONGO_MODULESTORE_BUILDER
,
None
,
189
),
# The way this traversal *should* be done.
(
MIXED_OLD_MONGO_MODULESTORE_BUILDER
,
0
,
387
),
# The pathological case - do *not* query a course this way!
(
MIXED_SPLIT_MODULESTORE_BUILDER
,
None
,
7
),
# The way this traversal *should* be done.
(
MIXED_SPLIT_MODULESTORE_BUILDER
,
0
,
145
)
# The pathological case - do *not* query a course this way!
)
@ddt.unpack
def
test_number_mongo_calls
(
self
,
depth
,
num_mongo_calls
):
with
MIXED_SPLIT_MODULESTORE_BUILDER
.
build
()
as
(
source_content
,
source_store
):
def
test_number_mongo_calls
(
self
,
store
,
depth
,
num_mongo_calls
):
with
store
.
build
()
as
(
source_content
,
source_store
):
source_course_key
=
source_store
.
make_course_key
(
'a'
,
'course'
,
'course'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment