From dbc2c53d65f9945ec5bce0c09b4b0ce56a479d0d Mon Sep 17 00:00:00 2001 From: MinRK Date: Mon, 23 Dec 2013 14:23:36 -0800 Subject: [PATCH] expect log message in test_decode_argument_invalid_unicode --- tornado/test/web_test.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tornado/test/web_test.py b/tornado/test/web_test.py index f4fa03a66..e12f7ec0e 100644 --- a/tornado/test/web_test.py +++ b/tornado/test/web_test.py @@ -588,10 +588,11 @@ class WSGISafeWebTest(WebTestCase): def test_decode_argument_invalid_unicode(self): # test that invalid unicode in URLs causes 400, not 500 - response = self.fetch("/typecheck/invalid%FF") - self.assertEqual(response.code, 400) - response = self.fetch("/typecheck/invalid?foo=%FF") - self.assertEqual(response.code, 400) + with ExpectLog(gen_log, ".*Invalid unicode.*"): + response = self.fetch("/typecheck/invalid%FF") + self.assertEqual(response.code, 400) + response = self.fetch("/typecheck/invalid?foo=%FF") + self.assertEqual(response.code, 400) def test_decode_argument_plus(self): # These urls are all equivalent. -- 2.47.2