diff --git a/kuma/attachments/tests/test_views.py b/kuma/attachments/tests/test_views.py index 7396ac52798..d467fb2126a 100644 --- a/kuma/attachments/tests/test_views.py +++ b/kuma/attachments/tests/test_views.py @@ -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): diff --git a/kuma/wiki/tests/test_views_code.py b/kuma/wiki/tests/test_views_code.py index 3bbb84bd52d..52cbf3599a2 100644 --- a/kuma/wiki/tests/test_views_code.py +++ b/kuma/wiki/tests/test_views_code.py @@ -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('') + assert response['Vary'] == 'Cookie' normalized = normalize_html(response.content) expected = ( @@ -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'