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
5f926eba
Commit
5f926eba
authored
Nov 09, 2012
by
Jay Zoldak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add better comments and modulestore cleanup.
parent
bc34d79d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
cms/djangoapps/contentstore/tests/tests.py
+6
-9
No files found.
cms/djangoapps/contentstore/tests/tests.py
View file @
5f926eba
...
...
@@ -239,9 +239,10 @@ class ContentStoreTest(TestCase):
def
tearDown
(
self
):
# Make sure you flush out the test modulestore after the end
# of the last test otherwise cms/djangoapps/contentstore/__init__.py
# update_templates() is complaining that there are duplicate
# templates.
# of the last test because otherwise on the next run
# cms/djangoapps/contentstore/__init__.py
# update_templates() will try to update the templates
# via upsert and it seems to be messing things up.
# If your test module gets in some weird state, do this manually
# from the bash shell to drop it.
# $ mongo test_xmodule --eval "db.dropDatabase()"
...
...
@@ -322,7 +323,6 @@ class ContentStoreTest(TestCase):
'^i4x:
\
/
\
/MITx
\
/999
\
/chapter
\
/([0-9]|[a-f]){32}$'
)
def
check_edit_unit
(
self
,
test_course_name
):
"""Check that editing functionality works on example courses"""
import_from_xml
(
modulestore
(),
'common/test/data/'
,
[
test_course_name
])
for
descriptor
in
modulestore
()
.
get_items
(
Location
(
None
,
None
,
'vertical'
,
None
,
None
)):
...
...
@@ -331,11 +331,9 @@ class ContentStoreTest(TestCase):
resp
=
self
.
client
.
get
(
reverse
(
'edit_unit'
,
kwargs
=
{
'location'
:
descriptor
.
location
.
url
()}))
self
.
assertEqual
(
resp
.
status_code
,
200
)
xmodule
.
modulestore
.
django
.
_MODULESTORES
=
{}
xmodule
.
modulestore
.
django
.
modulestore
()
.
collection
.
drop
()
def
test_edit_unit_toy
(
self
):
self
.
check_edit_unit
(
'toy'
)
def
test_edit_unit_full
(
self
):
self
.
check_edit_unit
(
'full'
)
\ No newline at end of file
self
.
check_edit_unit
(
'full'
)
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