Browse Source

More python3 fixes

test_fixup
Vadim Lebedev 2 years ago
parent
commit
be4531ffbc
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      tests.py

+ 5
- 4
tests.py View File

@@ -269,10 +269,11 @@ ITEM_NAME='test.txt'


class TestPasswordProtection(unittest.TestCase): class TestPasswordProtection(unittest.TestCase):
def setUp(self): def setUp(self):
with open(ZIPPATH, mode='w') as f:
if PY3:
f.write(base64.b64decode(ZIP_CONTENT).decode('latin1'))
else:
if PY3:
with open(ZIPPATH, mode='wb') as f:
f.write(base64.b64decode(ZIP_CONTENT))
else:
with open(ZIPPATH, mode='w') as f:
f.write(base64.b64decode(ZIP_CONTENT)) f.write(base64.b64decode(ZIP_CONTENT))




Loading…
Cancel
Save