diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/responses/test_cookie.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/responses/test_cookie.py b/tests/responses/test_cookie.py index ed881435e4..36cb43ed81 100644 --- a/tests/responses/test_cookie.py +++ b/tests/responses/test_cookie.py @@ -81,13 +81,16 @@ class SetCookieTests(SimpleTestCase): def test_samesite(self): response = HttpResponse() + response.set_cookie('example', samesite='None') + self.assertEqual(response.cookies['example']['samesite'], 'None') response.set_cookie('example', samesite='Lax') self.assertEqual(response.cookies['example']['samesite'], 'Lax') response.set_cookie('example', samesite='strict') self.assertEqual(response.cookies['example']['samesite'], 'strict') def test_invalid_samesite(self): - with self.assertRaisesMessage(ValueError, 'samesite must be "lax" or "strict".'): + msg = 'samesite must be "lax", "none", or "strict".' + with self.assertRaisesMessage(ValueError, msg): HttpResponse().set_cookie('example', samesite='invalid') |
