diff --git a/forms/tests/test_api.py b/forms/tests/test_api.py index acfe1efe..a1ee5f8b 100644 --- a/forms/tests/test_api.py +++ b/forms/tests/test_api.py @@ -503,8 +503,8 @@ def test_attachment_upload_and_download_public( } response = admin_client.post(url, data=payload, content_type="application/json") - # When an answer is created, the HTTP response should not contain attachments - assert response.json().get("attachments") is None + # When an answer is created, the HTTP response should not contain the key "attachments" + assert "attachments" not in response.json().keys() # Attachment should exist assert response.status_code == 201