diff options
author | Shadab Zafar <dufferzafar0@gmail.com> | 2016-06-05 23:14:49 +0530 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-06-06 11:52:45 -0700 |
commit | 40056e1cd75437680af7fb6e57c709b09b2bdb30 (patch) | |
tree | 1ba0b193937eca55316e424b231de088c7998d97 /test/pathod/test_language_http.py | |
parent | 78b2fa3a130837b53e1e839cca0d6e6f69b0500f (diff) | |
download | mitmproxy-40056e1cd75437680af7fb6e57c709b09b2bdb30.tar.gz mitmproxy-40056e1cd75437680af7fb6e57c709b09b2bdb30.tar.bz2 mitmproxy-40056e1cd75437680af7fb6e57c709b09b2bdb30.zip |
Py3: Fix useragent tests
Diffstat (limited to 'test/pathod/test_language_http.py')
-rw-r--r-- | test/pathod/test_language_http.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/pathod/test_language_http.py b/test/pathod/test_language_http.py index 4825bc33..4121dd26 100644 --- a/test/pathod/test_language_http.py +++ b/test/pathod/test_language_http.py @@ -301,18 +301,18 @@ def test_shortcuts(): assert next(language.parse_pathod( "400:l'foo'")).headers[0].key.val == b"Location" - assert "Android" in tutils.render(parse_request("get:/:ua")) - assert "User-Agent" in tutils.render(parse_request("get:/:ua")) + assert b"Android" in tutils.render(parse_request("get:/:ua")) + assert b"User-Agent" in tutils.render(parse_request("get:/:ua")) def test_user_agent(): e = http.ShortcutUserAgent.expr() v = e.parseString("ua")[0] - assert "Android" in v.string() + assert b"Android" in v.string() e = http.ShortcutUserAgent.expr() v = e.parseString("u'a'")[0] - assert "Android" not in v.string() + assert b"Android" not in v.string() v = e.parseString("u@100'")[0] assert len(str(v.freeze({}).value)) > 100 |