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
8268724e
Commit
8268724e
authored
Jul 28, 2014
by
Don Mitchell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check 0 sends means 0 not ignore
parent
1c17e056
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
common/lib/xmodule/xmodule/modulestore/tests/factories.py
+2
-2
common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py
+1
-1
No files found.
common/lib/xmodule/xmodule/modulestore/tests/factories.py
View file @
8268724e
...
@@ -266,7 +266,7 @@ def check_mongo_calls(mongo_store, num_finds=0, num_sends=None):
...
@@ -266,7 +266,7 @@ def check_mongo_calls(mongo_store, num_finds=0, num_sends=None):
"""
"""
if
mongo_store
.
get_modulestore_type
()
==
ModuleStoreEnum
.
Type
.
mongo
:
if
mongo_store
.
get_modulestore_type
()
==
ModuleStoreEnum
.
Type
.
mongo
:
with
check_exact_number_of_calls
(
mongo_store
.
collection
,
mongo_store
.
collection
.
find
,
num_finds
):
with
check_exact_number_of_calls
(
mongo_store
.
collection
,
mongo_store
.
collection
.
find
,
num_finds
):
if
num_sends
:
if
num_sends
is
not
None
:
with
check_exact_number_of_calls
(
with
check_exact_number_of_calls
(
mongo_store
.
database
.
connection
,
mongo_store
.
database
.
connection
,
mongo_store
.
database
.
connection
.
_send_message
,
# pylint: disable=protected-access
mongo_store
.
database
.
connection
.
_send_message
,
# pylint: disable=protected-access
...
@@ -291,7 +291,7 @@ def check_mongo_calls(mongo_store, num_finds=0, num_sends=None):
...
@@ -291,7 +291,7 @@ def check_mongo_calls(mongo_store, num_finds=0, num_sends=None):
wrap_patch
=
patch
.
object
(
collection
,
'find'
,
find_wrap
)
wrap_patch
=
patch
.
object
(
collection
,
'find'
,
find_wrap
)
wrap_patches
.
append
(
wrap_patch
)
wrap_patches
.
append
(
wrap_patch
)
wrap_patch
.
start
()
wrap_patch
.
start
()
if
num_sends
:
if
num_sends
is
not
None
:
connection
=
mongo_store
.
db_connection
.
database
.
connection
connection
=
mongo_store
.
db_connection
.
database
.
connection
with
check_exact_number_of_calls
(
with
check_exact_number_of_calls
(
connection
,
connection
,
...
...
common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py
View file @
8268724e
...
@@ -859,7 +859,7 @@ class TestMixedModuleStore(unittest.TestCase):
...
@@ -859,7 +859,7 @@ class TestMixedModuleStore(unittest.TestCase):
self
.
assertEqual
(
len
(
self
.
store
.
get_courses_for_wiki
(
'edX.simple.2012_Fall'
)),
0
)
self
.
assertEqual
(
len
(
self
.
store
.
get_courses_for_wiki
(
'edX.simple.2012_Fall'
)),
0
)
self
.
assertEqual
(
len
(
self
.
store
.
get_courses_for_wiki
(
'no_such_wiki'
)),
0
)
self
.
assertEqual
(
len
(
self
.
store
.
get_courses_for_wiki
(
'no_such_wiki'
)),
0
)
@ddt.data
((
'draft'
,
2
,
0
),
(
'split'
,
5
,
0
))
@ddt.data
((
'draft'
,
2
,
6
),
(
'split'
,
5
,
2
))
@ddt.unpack
@ddt.unpack
def
test_unpublish
(
self
,
default_ms
,
max_find
,
max_send
):
def
test_unpublish
(
self
,
default_ms
,
max_find
,
max_send
):
"""
"""
...
...
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