Switch offering to course and run
This commit is contained in:
committed by
Diana Huang
parent
78a2959540
commit
e39cc5dfa3
@@ -57,14 +57,15 @@ class TemplateTests(unittest.TestCase):
|
||||
|
||||
def test_factories(self):
|
||||
test_course = persistent_factories.PersistentCourseFactory.create(
|
||||
offering='tempcourse', org='testx',
|
||||
course='course', run='2014', org='testx',
|
||||
display_name='fun test course', user_id='testbot'
|
||||
)
|
||||
self.assertIsInstance(test_course, CourseDescriptor)
|
||||
self.assertEqual(test_course.display_name, 'fun test course')
|
||||
index_info = self.split_store.get_course_index_info(test_course.id)
|
||||
self.assertEqual(index_info['org'], 'testx')
|
||||
self.assertEqual(index_info['offering'], 'tempcourse')
|
||||
self.assertEqual(index_info['course'], 'course')
|
||||
self.assertEqual(index_info['run'], '2014')
|
||||
|
||||
test_chapter = persistent_factories.ItemFactory.create(display_name='chapter 1',
|
||||
parent_location=test_course.location)
|
||||
@@ -75,7 +76,7 @@ class TemplateTests(unittest.TestCase):
|
||||
|
||||
with self.assertRaises(DuplicateCourseError):
|
||||
persistent_factories.PersistentCourseFactory.create(
|
||||
offering='tempcourse', org='testx',
|
||||
course='course', run='2014', org='testx',
|
||||
display_name='fun test course', user_id='testbot'
|
||||
)
|
||||
|
||||
@@ -84,7 +85,7 @@ class TemplateTests(unittest.TestCase):
|
||||
Test create_xblock to create non persisted xblocks
|
||||
"""
|
||||
test_course = persistent_factories.PersistentCourseFactory.create(
|
||||
offering='tempcourse', org='testx',
|
||||
course='course', run='2014', org='testx',
|
||||
display_name='fun test course', user_id='testbot'
|
||||
)
|
||||
|
||||
@@ -111,7 +112,7 @@ class TemplateTests(unittest.TestCase):
|
||||
try saving temporary xblocks
|
||||
"""
|
||||
test_course = persistent_factories.PersistentCourseFactory.create(
|
||||
offering='tempcourse', org='testx',
|
||||
course='course', run='2014', org='testx',
|
||||
display_name='fun test course', user_id='testbot'
|
||||
)
|
||||
test_chapter = self.split_store.create_xblock(
|
||||
@@ -150,7 +151,7 @@ class TemplateTests(unittest.TestCase):
|
||||
|
||||
def test_delete_course(self):
|
||||
test_course = persistent_factories.PersistentCourseFactory.create(
|
||||
offering='history.doomed', org='edu.harvard',
|
||||
course='history', run='doomed', org='edu.harvard',
|
||||
display_name='doomed test course',
|
||||
user_id='testbot')
|
||||
persistent_factories.ItemFactory.create(display_name='chapter 1',
|
||||
@@ -173,7 +174,7 @@ class TemplateTests(unittest.TestCase):
|
||||
Test get_block_generations
|
||||
"""
|
||||
test_course = persistent_factories.PersistentCourseFactory.create(
|
||||
offering='history.hist101', org='edu.harvard',
|
||||
course='history', run='hist101', org='edu.harvard',
|
||||
display_name='history test course',
|
||||
user_id='testbot'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user