Merge pull request #21864 from edx/msingh/type_error2

BOM-749: Fixing error in test_assets.py
This commit is contained in:
Manjinder Singh
2019-09-30 11:44:21 -04:00
committed by GitHub

View File

@@ -59,7 +59,7 @@ class AssetsTestCase(CourseTestCase):
Returns an in-memory file of the specified type with the given name for testing
"""
sample_asset = BytesIO()
sample_file_contents = "This file is generated by python unit test"
sample_file_contents = b"This file is generated by python unit test"
if asset_type == 'text':
sample_asset.name = '{name}.txt'.format(name=name)
sample_asset.write(sample_file_contents)