From 7138aed2a90bf3a5e81f9bd011b5e3769b8d53e7 Mon Sep 17 00:00:00 2001 From: Chris Dodge Date: Thu, 22 Aug 2013 13:30:52 -0400 Subject: [PATCH] add xlint tests in test_mongo.py --- .../xmodule/xmodule/modulestore/tests/test_mongo.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py b/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py index 7a7a28fbbf..40b3c6fd83 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py @@ -11,7 +11,7 @@ from xmodule.tests import DATA_DIR from xmodule.modulestore import Location from xmodule.modulestore.mongo import MongoModuleStore, MongoKeyValueStore from xmodule.modulestore.draft import DraftModuleStore -from xmodule.modulestore.xml_importer import import_from_xml +from xmodule.modulestore.xml_importer import import_from_xml, perform_xlint from xmodule.contentstore.mongo import MongoContentStore from xmodule.modulestore.tests.test_modulestore import check_path_to_location @@ -65,7 +65,8 @@ class TestMongoModuleStore(object): DATA_DIR, ['test_import_course'], static_content_store=content_store, - do_import_static=False + do_import_static=False, + verbose=True ) return store, content_store, draft_store @@ -133,6 +134,13 @@ class TestMongoModuleStore(object): '''Make sure that path_to_location works''' check_path_to_location(self.store) + def test_xlinter(self): + ''' + Run through the xlinter, we know the 'toy' course has violations, but the + number will continue to grow over time, so just check > 0 + ''' + assert_not_equals(perform_xlint(DATA_DIR, ['toy']), 0) + def test_get_courses_has_no_templates(self): courses = self.store.get_courses() for course in courses: