Skip to content

Commit

Permalink
tests(comments): use the new Werkzeug API to delete cookies
Browse files Browse the repository at this point in the history
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 committed Oct 30, 2023
1 parent fe5108a commit 4febaeb
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 4febaeb

Please sign in to comment.