From 770936f1f9b56010011c2af7f5f854d88f1c1d4f Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Wed, 21 Sep 2016 19:21:32 -0700 Subject: raise TypeError on invalid header assignment, fix #1562 --- test/netlib/test_strutils.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/netlib/test_strutils.py') diff --git a/test/netlib/test_strutils.py b/test/netlib/test_strutils.py index 5be254a3..0f58cac5 100644 --- a/test/netlib/test_strutils.py +++ b/test/netlib/test_strutils.py @@ -8,6 +8,8 @@ def test_always_bytes(): assert strutils.always_bytes("foo") == b"foo" with tutils.raises(ValueError): strutils.always_bytes(u"\u2605", "ascii") + with tutils.raises(TypeError): + strutils.always_bytes(42, "ascii") def test_native(): -- cgit v1.2.3