From 2ee5e8ef0e632545038a72f0cedc0320c59b00ff Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Mon, 6 Jun 2016 13:39:38 -0700 Subject: [PATCH] fix NestedMessage encoding --- pathod/language/base.py | 2 +- test/pathod/test_language_http.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pathod/language/base.py b/pathod/language/base.py index 6cafdebdb..25f3fd1ab 100644 --- a/pathod/language/base.py +++ b/pathod/language/base.py @@ -555,7 +555,7 @@ class NestedMessage(Token): try: self.parsed = self.nest_type( self.nest_type.expr().parseString( - value.val, + value.val.decode(), parseAll=True ) ) diff --git a/test/pathod/test_language_http.py b/test/pathod/test_language_http.py index 0ef1e1090..18059e3a6 100644 --- a/test/pathod/test_language_http.py +++ b/test/pathod/test_language_http.py @@ -324,7 +324,7 @@ def test_user_agent(): def test_nested_response(): e = http.NestedResponse.expr() v = e.parseString("s'200'")[0] - assert v.value.val == "200" + assert v.value.val == b"200" tutils.raises( language.ParseException, e.parseString,