From 506736b03ecb6e63a4db93f7c6d3246ab4298e3b Mon Sep 17 00:00:00 2001 From: Ayub khan Date: Tue, 3 Sep 2019 16:44:49 +0500 Subject: [PATCH] BOM-361 py3 unittest fix --- .../contentstore/views/tests/test_import_export.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cms/djangoapps/contentstore/views/tests/test_import_export.py b/cms/djangoapps/contentstore/views/tests/test_import_export.py index cfe8577cf0..888eb1809b 100644 --- a/cms/djangoapps/contentstore/views/tests/test_import_export.py +++ b/cms/djangoapps/contentstore/views/tests/test_import_export.py @@ -573,8 +573,11 @@ class ExportTestCase(CourseTestCase): output_url = result['ExportOutput'] resp = self.client.get(output_url) self._verify_export_succeeded(resp) + resp_content = b'' + for item in resp.streaming_content: + resp_content += item - buff = StringIO("".join(resp.streaming_content)) + buff = six.BytesIO(resp_content) return tarfile.open(fileobj=buff) def _verify_export_succeeded(self, resp):