Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Commit

Permalink
bug 1407806: Add test for Vary: Cookie header
Browse files Browse the repository at this point in the history
This header shouldn't be present, but is added by the BanMiddleware.
  • Loading branch information
jwhitlock committed Oct 18, 2017
1 parent e275ec0 commit b723ca6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions kuma/attachments/tests/test_views.py
Expand Up @@ -184,6 +184,7 @@ def test_legacy_redirect(client, file_attachment):
assert response.status_code == 301
assert 'Location' in response
assert response['Location'] == file_attachment['attachment'].get_file_url()
assert response['Vary'] == 'Cookie'


def test_edit_attachment_get(admin_client, root_doc):
Expand Down
2 changes: 2 additions & 0 deletions kuma/wiki/tests/test_views_code.py
Expand Up @@ -64,6 +64,7 @@ def test_code_sample(code_sample_doc, constance_config, client, settings):
assert response.status_code == 200
assert response['Access-Control-Allow-Origin'] == '*'
assert response.content.startswith('<!DOCTYPE html>')
assert response['Vary'] == 'Cookie'

normalized = normalize_html(response.content)
expected = (
Expand Down Expand Up @@ -137,3 +138,4 @@ def test_raw_code_sample_file(code_sample_doc, constance_config,
response = admin_client.get(file_url)
assert response.status_code == 302
assert response.url == attachment.get_file_url()
assert response['Vary'] == 'Cookie'

0 comments on commit b723ca6

Please sign in to comment.