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
fb565880
Commit
fb565880
authored
Sep 02, 2014
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweak mongo count numbers
parent
880673b9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
15 deletions
+23
-15
common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py
+17
-11
lms/djangoapps/courseware/tests/test_module_render.py
+6
-4
No files found.
common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py
View file @
fb565880
...
...
@@ -302,7 +302,7 @@ class TestMixedModuleStore(unittest.TestCase):
# split is 2 (would be 3 on course b/c it looks up the wiki_slug in definitions)
# TODO: LMS-11220: Document why draft find count is [2, 2]
# TODO: LMS-11220: Document why split find count is [3, 3]
@ddt.data
((
'draft'
,
[
2
,
2
],
0
),
(
'split'
,
[
2
,
2
],
0
))
@ddt.data
((
'draft'
,
[
2
,
2
],
0
),
(
'split'
,
[
3
,
3
],
0
))
@ddt.unpack
def
test_get_item
(
self
,
default_ms
,
max_find
,
max_send
):
self
.
initdb
(
default_ms
)
...
...
@@ -328,7 +328,7 @@ class TestMixedModuleStore(unittest.TestCase):
# compared to get_item for the course, draft asks for both draft and published
# TODO: LMS-11220: Document why split find count is 3
@ddt.data
((
'draft'
,
8
,
0
),
(
'split'
,
2
,
0
))
@ddt.data
((
'draft'
,
8
,
0
),
(
'split'
,
3
,
0
))
@ddt.unpack
def
test_get_items
(
self
,
default_ms
,
max_find
,
max_send
):
self
.
initdb
(
default_ms
)
...
...
@@ -357,7 +357,7 @@ class TestMixedModuleStore(unittest.TestCase):
# split: 3 to get the course structure & the course definition (show_calculator is scope content)
# before the change. 1 during change to refetch the definition. 3 afterward (b/c it calls get_item to return the "new" object).
# 2 sends to update index & structure (calculator is a setting field)
@ddt.data
((
'draft'
,
11
,
5
),
(
'split'
,
6
,
2
))
@ddt.data
((
'draft'
,
11
,
5
),
(
'split'
,
3
,
2
))
@ddt.unpack
def
test_update_item
(
self
,
default_ms
,
max_find
,
max_send
):
"""
...
...
@@ -438,7 +438,9 @@ class TestMixedModuleStore(unittest.TestCase):
component
=
self
.
store
.
publish
(
component
.
location
,
self
.
user_id
)
self
.
assertFalse
(
self
.
store
.
has_changes
(
component
))
@ddt.data
((
'draft'
,
8
,
2
),
(
'split'
,
13
,
4
))
# TODO: LMS-11220: Document why split find count is 4
# TODO: LMS-11220: Document why split send count is 3
@ddt.data
((
'draft'
,
8
,
2
),
(
'split'
,
4
,
3
))
@ddt.unpack
def
test_delete_item
(
self
,
default_ms
,
max_find
,
max_send
):
"""
...
...
@@ -457,7 +459,9 @@ class TestMixedModuleStore(unittest.TestCase):
with
self
.
assertRaises
(
ItemNotFoundError
):
self
.
store
.
get_item
(
self
.
writable_chapter_location
)
@ddt.data
((
'draft'
,
9
,
2
),
(
'split'
,
13
,
4
))
# TODO: LMS-11220: Document why split find count is 4
# TODO: LMS-11220: Document why split send count is 3
@ddt.data
((
'draft'
,
9
,
2
),
(
'split'
,
4
,
3
))
@ddt.unpack
def
test_delete_private_vertical
(
self
,
default_ms
,
max_find
,
max_send
):
"""
...
...
@@ -502,7 +506,8 @@ class TestMixedModuleStore(unittest.TestCase):
self
.
assertFalse
(
self
.
store
.
has_item
(
leaf_loc
))
self
.
assertNotIn
(
vert_loc
,
course
.
children
)
@ddt.data
((
'draft'
,
5
,
1
),
(
'split'
,
5
,
2
))
# TODO: LMS-11220: Document why split find count is 2
@ddt.data
((
'draft'
,
5
,
1
),
(
'split'
,
2
,
2
))
@ddt.unpack
def
test_delete_draft_vertical
(
self
,
default_ms
,
max_find
,
max_send
):
"""
...
...
@@ -537,7 +542,7 @@ class TestMixedModuleStore(unittest.TestCase):
# TODO: LMS-11220: Document why split find count is 5
# TODO: LMS-11220: Document why draft find count is 4
@ddt.data
((
'draft'
,
4
,
0
),
(
'split'
,
4
,
0
))
@ddt.data
((
'draft'
,
4
,
0
),
(
'split'
,
5
,
0
))
@ddt.unpack
def
test_get_courses
(
self
,
default_ms
,
max_find
,
max_send
):
self
.
initdb
(
default_ms
)
...
...
@@ -707,9 +712,9 @@ class TestMixedModuleStore(unittest.TestCase):
# - load inheritance data
# TODO: LMS-11220: Document why draft send count is 5
# TODO: LMS-11220: Document why draft find count is
18
# TODO: LMS-11220: Document why split find count is
16
@ddt.data
((
'draft'
,
[
1
8
,
5
],
0
),
(
'split'
,
[
14
,
6
],
0
))
# TODO: LMS-11220: Document why draft find count is
[19, 6]
# TODO: LMS-11220: Document why split find count is
[2, 2]
@ddt.data
((
'draft'
,
[
1
9
,
6
],
0
),
(
'split'
,
[
2
,
2
],
0
))
@ddt.unpack
def
test_path_to_location
(
self
,
default_ms
,
num_finds
,
num_sends
):
"""
...
...
@@ -1039,7 +1044,8 @@ class TestMixedModuleStore(unittest.TestCase):
# Sends:
# - insert structure
# - write index entry
@ddt.data
((
'draft'
,
3
,
6
),
(
'split'
,
7
,
2
))
# TODO: LMS-11220: Document why split find count is 3
@ddt.data
((
'draft'
,
3
,
6
),
(
'split'
,
3
,
2
))
@ddt.unpack
def
test_unpublish
(
self
,
default_ms
,
max_find
,
max_send
):
"""
...
...
lms/djangoapps/courseware/tests/test_module_render.py
View file @
fb565880
...
...
@@ -333,8 +333,9 @@ class TestTOC(ModuleStoreTestCase):
)
# TODO: LMS-11220: Document why split find count is 21
@ddt.data
((
ModuleStoreEnum
.
Type
.
mongo
,
1
,
0
),
(
ModuleStoreEnum
.
Type
.
split
,
5
,
0
))
# TODO: LMS-11220: Document why split find count is 9
# TODO: LMS-11220: Document why mongo find count is 4
@ddt.data
((
ModuleStoreEnum
.
Type
.
mongo
,
4
,
0
),
(
ModuleStoreEnum
.
Type
.
split
,
9
,
0
))
@ddt.unpack
def
test_toc_toy_from_chapter
(
self
,
default_ms
,
num_finds
,
num_sends
):
with
self
.
store
.
default_store
(
default_ms
):
...
...
@@ -361,8 +362,9 @@ class TestTOC(ModuleStoreTestCase):
for
toc_section
in
expected
:
self
.
assertIn
(
toc_section
,
actual
)
# TODO: LMS-11220: Document why split find count is 21
@ddt.data
((
ModuleStoreEnum
.
Type
.
mongo
,
1
,
0
),
(
ModuleStoreEnum
.
Type
.
split
,
5
,
0
))
# TODO: LMS-11220: Document why split find count is 9
# TODO: LMS-11220: Document why mongo find count is 4
@ddt.data
((
ModuleStoreEnum
.
Type
.
mongo
,
4
,
0
),
(
ModuleStoreEnum
.
Type
.
split
,
9
,
0
))
@ddt.unpack
def
test_toc_toy_from_section
(
self
,
default_ms
,
num_finds
,
num_sends
):
with
self
.
store
.
default_store
(
default_ms
):
...
...
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