Skip to content

Commit

Permalink
improve assert
Browse files Browse the repository at this point in the history
  • Loading branch information
NC-jsAhonen committed Feb 3, 2025
1 parent 412ad4a commit 032364b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions forms/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 032364b

Please sign in to comment.