Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test failures related to Werkzeug updates #142

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions test_seasurf.py
Expand Up @@ -741,7 +741,7 @@ def test_header_set_cookie(self):
res3.headers.get('Set-Cookie', ''),
'CSRF cookie always be re-set if a token is requested by the template')

client.cookie_jar.clear()
client.delete_cookie(self.csrf._csrf_name)

res4 = client.get('/foo')

Expand All @@ -755,9 +755,9 @@ def test_header_set_on_post(self):
res1 = client.post('/bar', headers=headers)
self.assertEqual(res1.status_code, 403)

for cookie in client.cookie_jar:
if cookie.name == self.csrf._csrf_name:
headers[self.csrf._csrf_header_name] = cookie.value
cookie = client.get_cookie(self.csrf._csrf_name)
if cookie:
headers[self.csrf._csrf_header_name] = cookie.value

res2 = client.post('/bar', headers=headers)
self.assertEqual(res2.status_code, 200)
Expand Down