]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
expect log message in test_decode_argument_invalid_unicode 963/head
authorMinRK <benjaminrk@gmail.com>
Mon, 23 Dec 2013 22:23:36 +0000 (14:23 -0800)
committerMinRK <benjaminrk@gmail.com>
Mon, 23 Dec 2013 22:23:36 +0000 (14:23 -0800)
tornado/test/web_test.py

index f4fa03a66ab52c799a86b179b0fe1808ae1eb7d8..e12f7ec0efcec221f3347ee5fee7b41fdff230b7 100644 (file)
@@ -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.