From 40056e1cd75437680af7fb6e57c709b09b2bdb30 Mon Sep 17 00:00:00 2001 From: Shadab Zafar Date: Sun, 5 Jun 2016 23:14:49 +0530 Subject: Py3: Fix useragent tests --- test/pathod/test_language_http.py | 8 ++++---- 1 file 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 -- cgit v1.2.3