# HG changeset patch # User Pathangi Jatinshravan # Date 1444152980 -28800 # Wed Oct 07 01:36:20 2015 +0800 # Node ID cf2443f7a60ecad1102b10647e0bb13e2f456029 # Parent 54461703ec8325098292448bbae8afdcea457970 Updated cookies unit test diff --git a/Lib/test/test_http_cookies.py b/Lib/test/test_http_cookies.py --- a/Lib/test/test_http_cookies.py +++ b/Lib/test/test_http_cookies.py @@ -161,6 +161,11 @@ self.assertEqual(C.output(), 'Set-Cookie: eggs=scrambled; Path=bar; Secure\r\nSet-Cookie: foo=foo') + def test_invalid_input(self): + C = cookies.SimpleCookie() + C.load('a=b; messages=[\"\"]; c=d;') + self.assertEqual(C.output(), 'Set-Cookie: a=b\r\nSet-Cookie: c=d') + def test_quoted_meta(self): # Try cookie with quoted meta-data C = cookies.SimpleCookie()