diff options
author | Shadab Zafar <dufferzafar0@gmail.com> | 2016-06-04 18:28:50 +0530 |
---|---|---|
committer | Shadab Zafar <dufferzafar0@gmail.com> | 2016-06-04 18:28:50 +0530 |
commit | 6ffe8b376e2ba47a21bc52c03c6cb3183844025d (patch) | |
tree | 3484ced8d0fc626f38550c260a782edb570f2ffe | |
parent | 0d4437a404e27cbaf648eeadb8a690c9852e795d (diff) | |
download | mitmproxy-6ffe8b376e2ba47a21bc52c03c6cb3183844025d.tar.gz mitmproxy-6ffe8b376e2ba47a21bc52c03c6cb3183844025d.tar.bz2 mitmproxy-6ffe8b376e2ba47a21bc52c03c6cb3183844025d.zip |
Py3: Write bytes to file
-rw-r--r-- | test/pathod/test_language_base.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/pathod/test_language_base.py b/test/pathod/test_language_base.py index a3e3935b..075dc2b8 100644 --- a/test/pathod/test_language_base.py +++ b/test/pathod/test_language_base.py @@ -132,7 +132,7 @@ class TestTokValueFile: with tutils.tmpdir() as t: p = os.path.join(t, "path") with open(p, "wb") as f: - f.write("x" * 10000) + f.write(b"x" * 10000) assert v.get_generator(language.Settings(staticdir=t)) @@ -207,13 +207,13 @@ class TestMisc: p = os.path.join(t, "path") s = base.Settings(staticdir=t) with open(p, "wb") as f: - f.write("a" * 20) + f.write(b"a" * 20) v = e.parseString("m<path")[0] tutils.raises("invalid value length", v.values, s) p = os.path.join(t, "path") with open(p, "wb") as f: - f.write("a" * 4) + f.write(b"a" * 4) v = e.parseString("m<path")[0] assert v.values(s) |