From bbf2398bac40812b5cb31b09399fcbb58c065bf5 Mon Sep 17 00:00:00 2001 From: JonahStanley Date: Mon, 24 Jun 2013 11:14:40 -0400 Subject: [PATCH] Fixed test_course_settings to not rely on full course --- .../contentstore/tests/test_course_settings.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/cms/djangoapps/contentstore/tests/test_course_settings.py b/cms/djangoapps/contentstore/tests/test_course_settings.py index d96fb9dca1..7de8a842ba 100644 --- a/cms/djangoapps/contentstore/tests/test_course_settings.py +++ b/cms/djangoapps/contentstore/tests/test_course_settings.py @@ -295,12 +295,10 @@ class CourseMetadataEditingTest(CourseTestCase): """ Tests for CourseMetadata. """ - #FIX def setUp(self): CourseTestCase.setUp(self) - # add in the full class too - import_from_xml(get_modulestore(self.course.location), 'common/test/data/', ['full']) - self.fullcourse_location = Location(['i4x', 'edX', 'full', 'course', '6.002_Spring_2012', None]) + CourseFactory.create(org='edX', course='999', display_name='Robot Super Course') + self.fullcourse_location = Location(['i4x', 'edX', '999', 'course', 'Robot_Super_Course', None]) def test_fetch_initial_fields(self): test_model = CourseMetadata.fetch(self.course.location) @@ -310,7 +308,7 @@ class CourseMetadataEditingTest(CourseTestCase): test_model = CourseMetadata.fetch(self.fullcourse_location) self.assertNotIn('graceperiod', test_model, 'blacklisted field leaked in') self.assertIn('display_name', test_model, 'full missing editable metadata field') - self.assertEqual(test_model['display_name'], 'Testing', "not expected value") + self.assertEqual(test_model['display_name'], 'Robot Super Course', "not expected value") self.assertIn('rerandomize', test_model, 'Missing rerandomize metadata field') self.assertIn('showanswer', test_model, 'showanswer field ') self.assertIn('xqa_key', test_model, 'xqa_key field ') @@ -350,7 +348,7 @@ class CourseMetadataEditingTest(CourseTestCase): # ensure no harm self.assertNotIn('graceperiod', test_model, 'blacklisted field leaked in') self.assertIn('display_name', test_model, 'full missing editable metadata field') - self.assertEqual(test_model['display_name'], 'Testing', "not expected value") + self.assertEqual(test_model['display_name'], 'Robot Super Course', "not expected value") self.assertIn('rerandomize', test_model, 'Missing rerandomize metadata field') # check for deletion effectiveness self.assertEqual('closed', test_model['showanswer'], 'showanswer field still in')