From 0d88b7eb83e7f52986dedc6bdcd56b1740b0b0c9 Mon Sep 17 00:00:00 2001 From: Heiko Becker Date: Sat, 16 Sep 2017 20:45:38 +0200 Subject: [PATCH] Fix invalid-utf8 test Fails with "UnicodeDecodeError: 'ascii' codec can't decode byte 0xed in position 8: ordinal not in range(128)" otherwise. --- tests/twisted/messages/invalid-utf8.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/twisted/messages/invalid-utf8.py b/tests/twisted/messages/invalid-utf8.py index a48c2f4..335ac4b 100644 --- a/tests/twisted/messages/invalid-utf8.py +++ b/tests/twisted/messages/invalid-utf8.py @@ -33,7 +33,7 @@ def test_with_message(q, stream, parts): # Idle's default character set is UTF-8. We send it a message which is # basically UTF-8, except that one of its code points is invalid. - stream.sendMessage('PRIVMSG', stream.nick, ':%s' % invalid_utf8, + stream.sendMessage('PRIVMSG', stream.nick, ':%s' % invalid_utf8.decode("utf8"), prefix='remoteuser') # Idle should signal that *something* was received. If it hasn't validated -- 2.14.1