Selaa lähdekoodia

test: fix str vs bytes in test file

Mikael Koli 4 vuotta sitten
vanhempi
sitoutus
c80b44e17c
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      redmail/tests/conftest.py

+ 1 - 1
redmail/tests/conftest.py

@@ -11,7 +11,7 @@ def copy_file_to_tmpdir(tmpdir, source_file, target_path=None):
     source_path = Path(os.path.dirname(__file__)) / "test_files" / source_file
 
     fh = tmpdir.join(Path(target_path).name if target_path is not None else source_path.name)
-    with open(source_path) as f:
+    with open(source_path, 'rb') as f:
         fh.write(f.read())
     return fh