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
fbc68df8
Commit
fbc68df8
authored
Oct 09, 2013
by
Don Mitchell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure bootstrapping tests start w/ clean slate.
parent
95ea4dc9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletions
+7
-1
cms/djangoapps/contentstore/tests/test_crud.py
+4
-1
common/lib/xmodule/xmodule/modulestore/django.py
+3
-0
No files found.
cms/djangoapps/contentstore/tests/test_crud.py
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'
))
...
...
common/lib/xmodule/xmodule/modulestore/django.py
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'
):
...
...
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