From e727ded167decd55e3ec708f7bcd6b14afce0cfa Mon Sep 17 00:00:00 2001 From: jinder1s Date: Mon, 30 Sep 2019 09:37:06 -0400 Subject: [PATCH] Explicitly setting string to byte --- cms/djangoapps/contentstore/views/tests/test_assets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cms/djangoapps/contentstore/views/tests/test_assets.py b/cms/djangoapps/contentstore/views/tests/test_assets.py index ea9c6d7a0c..c924b9f1d2 100644 --- a/cms/djangoapps/contentstore/views/tests/test_assets.py +++ b/cms/djangoapps/contentstore/views/tests/test_assets.py @@ -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)