fix NestedMessage encoding
This commit is contained in:
parent
6447c8ae22
commit
2ee5e8ef0e
|
@ -555,7 +555,7 @@ class NestedMessage(Token):
|
||||||
try:
|
try:
|
||||||
self.parsed = self.nest_type(
|
self.parsed = self.nest_type(
|
||||||
self.nest_type.expr().parseString(
|
self.nest_type.expr().parseString(
|
||||||
value.val,
|
value.val.decode(),
|
||||||
parseAll=True
|
parseAll=True
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
@ -324,7 +324,7 @@ def test_user_agent():
|
||||||
def test_nested_response():
|
def test_nested_response():
|
||||||
e = http.NestedResponse.expr()
|
e = http.NestedResponse.expr()
|
||||||
v = e.parseString("s'200'")[0]
|
v = e.parseString("s'200'")[0]
|
||||||
assert v.value.val == "200"
|
assert v.value.val == b"200"
|
||||||
tutils.raises(
|
tutils.raises(
|
||||||
language.ParseException,
|
language.ParseException,
|
||||||
e.parseString,
|
e.parseString,
|
||||||
|
|
Loading…
Reference in New Issue