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
@@ -50,14 +50,16 @@
"""Posting empty body request should return a 400 response
"""
- response = authenticated_client.post(
- reverse(COL_IRI, args=[deposit_collection.name]),
- content_type="application/atom+xml;type=entry",
- data=atom_dataset["entry-data-empty-body"],
- HTTP_SLUG="external-id",
- )
- assert response.status_code == status.HTTP_400_BAD_REQUEST
- assert b"Empty body request is not supported" in response.content
+ for atom_key in ["entry-data-empty-body", "entry-data-empty-body-no-namespace"]:
+ atom_content = atom_dataset[atom_key]
+ response = authenticated_client.post(
+ reverse(COL_IRI, args=[deposit_collection.name]),
+ content_type="application/atom+xml;type=entry",
+ data=atom_content,
+ HTTP_SLUG="external-id",
+ )
+ 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/api/test_deposit_update.py b/swh/deposit/tests/api/test_deposit_update.py
--- a/swh/deposit/tests/api/test_deposit_update.py
+++ b/swh/deposit/tests/api/test_deposit_update.py
@@ -763,15 +763,17 @@
EDIT_SE_IRI, args=[deposit_collection.name, complete_deposit.id]
)
- response = authenticated_client.put(
- update_uri,
- content_type="application/atom+xml;type=entry",
- data=atom_dataset["entry-data-empty-body"],
- HTTP_X_CHECK_SWHID=complete_deposit.swh_id,
- )
-
- assert response.status_code == status.HTTP_400_BAD_REQUEST
- assert b"Empty body request is not supported" in response.content
+ for atom_key in ["entry-data-empty-body", "entry-data-empty-body-no-namespace"]:
+ atom_content = atom_dataset[atom_key]
+ response = authenticated_client.put(
+ update_uri,
+ content_type="application/atom+xml;type=entry",
+ data=atom_content,
+ HTTP_X_CHECK_SWHID=complete_deposit.swh_id,
+ )
+
+ assert response.status_code == status.HTTP_400_BAD_REQUEST
+ assert b"Empty body request is not supported" in response.content
def test_put_update_metadata_done_deposit_failure_functional_checks(
diff --git a/swh/deposit/tests/data/atom/entry-data-empty-body.xml b/swh/deposit/tests/data/atom/entry-data-empty-body-no-namespace.xml
copy from swh/deposit/tests/data/atom/entry-data-empty-body.xml
copy to swh/deposit/tests/data/atom/entry-data-empty-body-no-namespace.xml
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 @@
-
+