Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7124395
D4057.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
972 B
Subscribers
None
D4057.diff
View Options
diff --git a/swh/deposit/tests/api/test_deposit_atom.py b/swh/deposit/tests/api/test_deposit_atom.py
--- a/swh/deposit/tests/api/test_deposit_atom.py
+++ b/swh/deposit/tests/api/test_deposit_atom.py
@@ -54,8 +54,10 @@
reverse(COL_IRI, args=[deposit_collection.name]),
content_type="application/atom+xml;type=entry",
data=atom_dataset["entry-data-empty-body"],
+ HTTP_SLUG="something",
)
assert response.status_code == status.HTTP_400_BAD_REQUEST
+ assert b"Empty body request is not supported" in response.content
def test_post_deposit_atom_400_badly_formatted_atom(
diff --git a/swh/deposit/tests/data/atom/entry-data-empty-body.xml b/swh/deposit/tests/data/atom/entry-data-empty-body.xml
--- a/swh/deposit/tests/data/atom/entry-data-empty-body.xml
+++ b/swh/deposit/tests/data/atom/entry-data-empty-body.xml
@@ -1,2 +1,2 @@
<?xml version="1.0"?>
-<entry xmlns="http://www.w3.org/2005/Atom"></entry>
+<entry></entry>
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Dec 21 2024, 10:07 AM (11 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3223300
Attached To
D4057: Fix deposit atom test to actually check the response message
Event Timeline
Log In to Comment