Skip to content

Commit

Permalink
tests(comments): use the new Werkzeug API to delete cookies (#973)
Browse files Browse the repository at this point in the history
tests(comments): use the new Werkzeug API to delete cookies

Since 2.4 [1], Werkzeug deprecated the old `server_name`-based API,
the new way to delete cookies based on server name is to use `domain` kwarg.

This broke NixOS testing of `isso` with our newer dependencies [2].

[1]: https://werkzeug.palletsprojects.com/en/2.3.x/test/#werkzeug.test.Client.delete_cookie
[2]: NixOS/nixpkgs#264081
  • Loading branch information
RaitoBezarius authored Oct 31, 2023
1 parent a5514d7 commit 9773b19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion isso/tests/test_comments.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def testFetchAuthorization(self):
r = self.get('/id/1?plain=1')
self.assertEqual(r.status_code, 200)

self.client.delete_cookie('localhost.local', '1')
self.client.delete_cookie(key='1', domain='localhost')
r = self.get('/id/1?plain=1')
self.assertEqual(r.status_code, 403)

Expand Down

0 comments on commit 9773b19

Please sign in to comment.