Skip to content

Commit

Permalink
Merge pull request #142 from amiantos/main
Browse files Browse the repository at this point in the history
Fix test failures related to Werkzeug updates
  • Loading branch information
alanhamlett authored Jul 29, 2024
2 parents f383b48 + 55128d0 commit f7f54f2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test_seasurf.py
Original file line number Diff line number Diff line change
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

0 comments on commit f7f54f2

Please sign in to comment.