add ability to rewrite links on the old /courses/<org>/<course>/<run>/jump_to/i4x://<org>/<course> .. intracourseware linking to the new portable /jump_to_id/<id> format

This commit is contained in:
Chris Dodge
2013-08-09 01:03:16 -04:00
parent 25d6de243e
commit e2358af6a9
3 changed files with 50 additions and 3 deletions

View File

@@ -777,11 +777,16 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
import_from_xml(module_store, 'common/test/data/', ['toy'], static_content_store=content_store)
# first check a static asset link
html_module_location = Location(['i4x', 'edX', 'toy', 'html', 'nonportable'])
html_module = module_store.get_instance('edX/toy/2012_Fall', html_module_location)
self.assertIn('/static/foo.jpg', html_module.data)
# then check a intra courseware link
html_module_location = Location(['i4x', 'edX', 'toy', 'html', 'nonportable_link'])
html_module = module_store.get_instance('edX/toy/2012_Fall', html_module_location)
self.assertIn('/jump_to_id/nonportable_link', html_module.data)
def test_delete_course(self):
"""
This test will import a course, make a draft item, and delete it. This will also assert that the