add unit test
This commit is contained in:
@@ -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):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user