Merge pull request #12827 from edx/release
Release -> Master after revert
This commit is contained in:
@@ -1000,7 +1000,7 @@ class MiscCourseTests(ContentStoreTestCase):
|
||||
3) computing thumbnail location of asset
|
||||
4) deleting the asset from the course
|
||||
"""
|
||||
asset_key = self.course.id.make_asset_key('asset', 'sample_static.html')
|
||||
asset_key = self.course.id.make_asset_key('asset', 'sample_static.txt')
|
||||
content = StaticContent(
|
||||
asset_key, "Fake asset", "application/text", "test",
|
||||
)
|
||||
@@ -1072,7 +1072,7 @@ class MiscCourseTests(ContentStoreTestCase):
|
||||
draft content is also deleted
|
||||
"""
|
||||
# add an asset
|
||||
asset_key = self.course.id.make_asset_key('asset', 'sample_static.html')
|
||||
asset_key = self.course.id.make_asset_key('asset', 'sample_static.txt')
|
||||
content = StaticContent(
|
||||
asset_key, "Fake asset", "application/text", "test",
|
||||
)
|
||||
|
||||
@@ -121,7 +121,7 @@ class CourseTestCase(ProceduralCourseTestMixin, ModuleStoreTestCase):
|
||||
SEQUENTIAL = 'vertical_sequential'
|
||||
DRAFT_HTML = 'draft_html'
|
||||
DRAFT_VIDEO = 'draft_video'
|
||||
LOCKED_ASSET_KEY = AssetLocation.from_deprecated_string('/c4x/edX/toy/asset/sample_static.html')
|
||||
LOCKED_ASSET_KEY = AssetLocation.from_deprecated_string('/c4x/edX/toy/asset/sample_static.txt')
|
||||
|
||||
def import_and_populate_course(self):
|
||||
"""
|
||||
|
||||
@@ -126,7 +126,7 @@ class BasicAssetsTestCase(AssetsTestCase):
|
||||
)
|
||||
course = module_store.get_course(course_id)
|
||||
|
||||
filename = 'sample_static.html'
|
||||
filename = 'sample_static.txt'
|
||||
html_src_attribute = '"/static/{}"'.format(filename)
|
||||
asset_url = replace_static_urls(html_src_attribute, course_id=course.id)
|
||||
url = asset_url.replace('"', '')
|
||||
@@ -379,7 +379,7 @@ class LockAssetTestCase(AssetsTestCase):
|
||||
"""
|
||||
def verify_asset_locked_state(locked):
|
||||
""" Helper method to verify lock state in the contentstore """
|
||||
asset_location = StaticContent.get_location_from_path('/c4x/edX/toy/asset/sample_static.html')
|
||||
asset_location = StaticContent.get_location_from_path('/c4x/edX/toy/asset/sample_static.txt')
|
||||
content = contentstore().find(asset_location)
|
||||
self.assertEqual(content.locked, locked)
|
||||
|
||||
@@ -387,14 +387,14 @@ class LockAssetTestCase(AssetsTestCase):
|
||||
""" Helper method for posting asset update. """
|
||||
content_type = 'application/txt'
|
||||
upload_date = datetime(2013, 6, 1, 10, 30, tzinfo=UTC)
|
||||
asset_location = course.id.make_asset_key('asset', 'sample_static.html')
|
||||
asset_location = course.id.make_asset_key('asset', 'sample_static.txt')
|
||||
url = reverse_course_url('assets_handler', course.id, kwargs={'asset_key_string': unicode(asset_location)})
|
||||
|
||||
resp = self.client.post(
|
||||
url,
|
||||
# pylint: disable=protected-access
|
||||
json.dumps(assets._get_asset_json(
|
||||
"sample_static.html", content_type, upload_date, asset_location, None, lock)),
|
||||
"sample_static.txt", content_type, upload_date, asset_location, None, lock)),
|
||||
"application/json"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user