Skip to content

Commit

Permalink
Fix error with set_cookie() during tests
Browse files Browse the repository at this point in the history
According to https://github.com/pallets/werkzeug/blob/f3c803b3ade485a45f12b6d6617595350c0f03e2/CHANGES.rst#version-230
The first positional server_name parameter to set_cookie and delete_cookie is deprecated. Use the domain parameter instead."
  • Loading branch information
zas committed Oct 25, 2023
1 parent cad4c46 commit bce02d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/frontend/views_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_quick_start(self):
def test_home_page_french_cookie(self):
"Test / in french (cookie)"
server_name = self.app.config.get('SERVER_NAME') or 'localhost'
self.client.set_cookie(server_name, 'language', 'fr')
self.client.set_cookie('language', 'fr', domain=server_name)
response = self.client.get("/")
self.assert200(response)
self.assertIn(b'fichiers audio', response.data)
Expand Down

0 comments on commit bce02d8

Please sign in to comment.