Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
fbc68df8
Commit
fbc68df8
authored
11 years ago
by
Don Mitchell
Browse files
Options
Downloads
Patches
Plain Diff
Ensure bootstrapping tests start w/ clean slate.
parent
95ea4dc9
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cms/djangoapps/contentstore/tests/test_crud.py
+4
-1
4 additions, 1 deletion
cms/djangoapps/contentstore/tests/test_crud.py
common/lib/xmodule/xmodule/modulestore/django.py
+3
-0
3 additions, 0 deletions
common/lib/xmodule/xmodule/modulestore/django.py
with
7 additions
and
1 deletion
cms/djangoapps/contentstore/tests/test_crud.py
+
4
−
1
View file @
fbc68df8
...
...
@@ -2,7 +2,7 @@ import unittest
from
xmodule
import
templates
from
xmodule.modulestore.tests
import
persistent_factories
from
xmodule.course_module
import
CourseDescriptor
from
xmodule.modulestore.django
import
modulestore
,
loc_mapper
from
xmodule.modulestore.django
import
modulestore
,
loc_mapper
,
clear_existing_modulestores
from
xmodule.seq_module
import
SequenceDescriptor
from
xmodule.capa_module
import
CapaDescriptor
from
xmodule.modulestore.locator
import
CourseLocator
,
BlockUsageLocator
...
...
@@ -17,6 +17,9 @@ class TemplateTests(unittest.TestCase):
Test finding and using the templates (boilerplates) for xblocks.
"""
def
setUp
(
self
):
clear_existing_modulestores
()
def
test_get_templates
(
self
):
found
=
templates
.
all_templates
()
self
.
assertIsNotNone
(
found
.
get
(
'
course
'
))
...
...
This diff is collapsed.
Click to expand it.
common/lib/xmodule/xmodule/modulestore/django.py
+
3
−
0
View file @
fbc68df8
...
...
@@ -141,6 +141,9 @@ def clear_existing_modulestores():
This is useful for flushing state between unit tests.
"""
_MODULESTORES
.
clear
()
# pylint: disable=W0603
global
_loc_singleton
_loc_singleton
=
None
def
editable_modulestore
(
name
=
'
default
'
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment