add unit test

This commit is contained in:
Chris Dodge
2013-02-21 11:22:20 -05:00
parent 68a8587ed2
commit a7f6545cbc
2 changed files with 12 additions and 1 deletions

View File

@@ -421,6 +421,17 @@ class ContentStoreTest(ModuleStoreTestCase):
self.assertIn('markdown', problem.metadata, "markdown is missing from metadata")
self.assertNotIn('markdown', problem.editable_metadata_fields, "Markdown slipped into the editable metadata fields")
def test_import_metadata_with_attempts_empty_string(self):
import_from_xml(modulestore(), 'common/test/data/', ['simple'])
ms = modulestore('direct')
asserted = False
try:
effort = ms.get_item(Location(['i4x', 'edX', 'simple', 'problem', 'ps01-simple', None]))
except ItemNotFoundError:
asserted = True
# make sure we found the item (e.g. it didn't error while loading)
self.assertFalse(asserted)
class TemplateTestCase(ModuleStoreTestCase):