Better test for Vary header

This commit is contained in:
Simon Willison 2020-06-06 12:26:19 -07:00
commit 070838bfa1
2 changed files with 6 additions and 2 deletions

View file

@ -132,8 +132,6 @@ class TestClient:
if csrftoken_from is True:
csrftoken_from = path
token_response = await self._request(csrftoken_from)
# Check this had a Vary: Cookie header
assert "Cookie" == token_response.headers["vary"]
csrftoken = token_response.cookies["ds_csrftoken"]
cookies["ds_csrftoken"] = csrftoken
post_data["csrftoken"] = csrftoken