Fixing one more bytes vs string battle in Python 3
authorChristopher Allan Webber <cwebber@dustycloud.org>
Thu, 11 Feb 2016 19:36:05 +0000 (11:36 -0800)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Thu, 11 Feb 2016 19:36:05 +0000 (11:36 -0800)
mediagoblin/tests/test_workbench.py

index f3ff57ed669687f0f8d4ef179cd8bcb73da7b0c8..3202e698cfa12d64d86f90d2be8353fd398dae30 100644 (file)
@@ -69,7 +69,7 @@ class TestWorkbench(object):
         filepath = ['dir1', 'dir2', 'ourfile.txt']
 
         with this_storage.get_file(filepath, 'w') as our_file:
-            our_file.write('Our file')
+            our_file.write(b'Our file')
 
         # with a local file storage
         filename = this_workbench.localized_file(this_storage, filepath)
@@ -83,7 +83,7 @@ class TestWorkbench(object):
 
         # ... write a brand new file, again ;)
         with this_storage.get_file(filepath, 'w') as our_file:
-            our_file.write('Our file')
+            our_file.write(b'Our file')
 
         filename = this_workbench.localized_file(this_storage, filepath)
         assert filename == os.path.join(