From 9a56b4b13ed92d2d5bb00d6bdb905a73bc5f2f0a Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Fri, 13 Apr 2018 20:58:31 -0400 Subject: Fixed #27863 -- Added support for the SameSite cookie flag. Thanks Alex Gaynor for contributing to the patch. --- tests/httpwrappers/tests.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/httpwrappers') diff --git a/tests/httpwrappers/tests.py b/tests/httpwrappers/tests.py index a387ca1f74..985380cc57 100644 --- a/tests/httpwrappers/tests.py +++ b/tests/httpwrappers/tests.py @@ -746,6 +746,11 @@ class CookieTests(unittest.TestCase): # document.cookie parses whitespace. self.assertEqual(parse_cookie(' = b ; ; = ; c = ; '), {'': 'b', 'c': ''}) + def test_samesite(self): + c = SimpleCookie('name=value; samesite=lax; httponly') + self.assertEqual(c['name']['samesite'], 'lax') + self.assertIn('SameSite=lax', c.output()) + def test_httponly_after_load(self): c = SimpleCookie() c.load("name=val") -- cgit v1.2.1