Commit fbc68df8 by Don Mitchell

Ensure bootstrapping tests start w/ clean slate.

parent 95ea4dc9
......@@ -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'))
......
......@@ -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'):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment