From e5117dba13347717835880722ca568976cabeeea Mon Sep 17 00:00:00 2001 From: Victor Shnayder Date: Wed, 25 Jul 2012 18:18:39 -0400 Subject: [PATCH] Mostly fix tests. * change custom tags in test/data/full to new single-tag format * fix broken file references * fix argument to import_from_xml * error_handler fix in mongo.py in next commit --- cms/djangoapps/contentstore/tests/tests.py | 2 +- cms/djangoapps/github_sync/tests/__init__.py | 2 +- common/test/data/full/course/6.002_Spring_2012.xml | 2 +- .../Administrivia_and_Circuit_Elements.xml | 8 ++------ .../data/full/sequential/System_Usage_Sequence.xml | 1 - common/test/data/full/vertical/vertical_58.xml | 12 +++--------- common/test/data/full/vertical/vertical_89.xml | 12 +++--------- common/test/data/full/vertical/vertical_94.xml | 12 +++--------- common/test/data/full/vertical/vertical_98.xml | 12 +++--------- 9 files changed, 17 insertions(+), 46 deletions(-) diff --git a/cms/djangoapps/contentstore/tests/tests.py b/cms/djangoapps/contentstore/tests/tests.py index b7c55389b6..9dfe5d614a 100644 --- a/cms/djangoapps/contentstore/tests/tests.py +++ b/cms/djangoapps/contentstore/tests/tests.py @@ -196,7 +196,7 @@ class EditTestCase(ContentStoreTestCase): xmodule.modulestore.django.modulestore().collection.drop() def check_edit_item(self, test_course_name): - import_from_xml('common/test/data/', test_course_name) + import_from_xml('common/test/data/', [test_course_name]) for descriptor in modulestore().get_items(Location(None, None, None, None, None)): print "Checking ", descriptor.location.url() diff --git a/cms/djangoapps/github_sync/tests/__init__.py b/cms/djangoapps/github_sync/tests/__init__.py index c95d538030..6b374cda2c 100644 --- a/cms/djangoapps/github_sync/tests/__init__.py +++ b/cms/djangoapps/github_sync/tests/__init__.py @@ -57,7 +57,7 @@ class GithubSyncTestCase(TestCase): """ self.assertEquals('Toy Course', self.import_course.metadata['display_name']) self.assertIn( - Location('i4x://edx/local_repo/chapter/Overview'), + Location('i4x://edX/toy/chapter/Overview'), [child.location for child in self.import_course.get_children()]) self.assertEquals(1, len(self.import_course.get_children())) diff --git a/common/test/data/full/course/6.002_Spring_2012.xml b/common/test/data/full/course/6.002_Spring_2012.xml index d6398cdc46..0d22e96beb 100644 --- a/common/test/data/full/course/6.002_Spring_2012.xml +++ b/common/test/data/full/course/6.002_Spring_2012.xml @@ -6,7 +6,7 @@ - + diff --git a/common/test/data/full/sequential/Administrivia_and_Circuit_Elements.xml b/common/test/data/full/sequential/Administrivia_and_Circuit_Elements.xml index 28b56fb9b0..5c4c65f12d 100644 --- a/common/test/data/full/sequential/Administrivia_and_Circuit_Elements.xml +++ b/common/test/data/full/sequential/Administrivia_and_Circuit_Elements.xml @@ -2,17 +2,13 @@ - - discuss - + S1E4 has been removed. diff --git a/common/test/data/full/sequential/System_Usage_Sequence.xml b/common/test/data/full/sequential/System_Usage_Sequence.xml index baf73f1e9e..571229be7c 100644 --- a/common/test/data/full/sequential/System_Usage_Sequence.xml +++ b/common/test/data/full/sequential/System_Usage_Sequence.xml @@ -3,5 +3,4 @@ - diff --git a/common/test/data/full/vertical/vertical_58.xml b/common/test/data/full/vertical/vertical_58.xml index 7eba0f9dad..5707e6acf3 100644 --- a/common/test/data/full/vertical/vertical_58.xml +++ b/common/test/data/full/vertical/vertical_58.xml @@ -1,12 +1,6 @@ diff --git a/common/test/data/full/vertical/vertical_89.xml b/common/test/data/full/vertical/vertical_89.xml index 06b13846d2..da15a6751a 100644 --- a/common/test/data/full/vertical/vertical_89.xml +++ b/common/test/data/full/vertical/vertical_89.xml @@ -3,13 +3,7 @@