From 0bf9351aae009a58aaae6cc56cadebcbe796b3f7 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Mon, 27 Nov 2023 15:02:26 +0100 Subject: [PATCH] Fix invalid test files These are Codemeta terms, but they were used in the Atom namespace. As they are not read by the tests using them, we can just remove them. --- .../tests/api/test_deposit_private_check.py | 4 ++-- .../tests/data/atom/entry-data-no-origin-url.xml | 16 ---------------- swh/deposit/tests/data/atom/entry-data0.xml | 16 ---------------- swh/deposit/tests/data/atom/entry-data1.xml | 16 ---------------- 4 files changed, 2 insertions(+), 50 deletions(-) diff --git a/swh/deposit/tests/api/test_deposit_private_check.py b/swh/deposit/tests/api/test_deposit_private_check.py index dca61b6c..f5821537 100644 --- a/swh/deposit/tests/api/test_deposit_private_check.py +++ b/swh/deposit/tests/api/test_deposit_private_check.py @@ -59,7 +59,7 @@ def test_deposit_ok( assert response.status_code == status.HTTP_200_OK data = response.json() - assert data["status"] == DEPOSIT_STATUS_VERIFIED + assert data["status"] == DEPOSIT_STATUS_VERIFIED, data deposit = Deposit.objects.get(pk=deposit.id) assert deposit.status == DEPOSIT_STATUS_VERIFIED @@ -202,7 +202,7 @@ def test_check_deposit_metadata_ok( assert response.status_code == status.HTTP_200_OK data = response.json() - assert data["status"] == DEPOSIT_STATUS_VERIFIED + assert data["status"] == DEPOSIT_STATUS_VERIFIED, data deposit = Deposit.objects.get(pk=deposit.id) assert deposit.status == DEPOSIT_STATUS_VERIFIED diff --git a/swh/deposit/tests/data/atom/entry-data-no-origin-url.xml b/swh/deposit/tests/data/atom/entry-data-no-origin-url.xml index 2577103c..9a183a70 100644 --- a/swh/deposit/tests/data/atom/entry-data-no-origin-url.xml +++ b/swh/deposit/tests/data/atom/entry-data-no-origin-url.xml @@ -5,22 +5,6 @@ <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id> <updated>2017-10-07T15:17:08Z</updated> <author>some awesome author</author> - <applicationCategory>something</applicationCategory> <name>awesome-compiler</name> - <description>This is an awesome compiler destined to -awesomely compile stuff -and other stuff</description> - <keywords>compiler,programming,language</keywords> - <dateCreated>2005-10-07T17:17:08Z</dateCreated> - <datePublished>2005-10-07T17:17:08Z</datePublished> - <releaseNotes>release note</releaseNotes> - <relatedLink>related link</relatedLink> - <sponsor></sponsor> - <programmingLanguage>Awesome</programmingLanguage> - <codeRepository>https://hoster.org/awesome-compiler</codeRepository> - <operatingSystem>GNU/Linux</operatingSystem> - <version>0.0.1</version> - <developmentStatus>running</developmentStatus> - <runtimePlatform>all</runtimePlatform> </entry> diff --git a/swh/deposit/tests/data/atom/entry-data0.xml b/swh/deposit/tests/data/atom/entry-data0.xml index 53d7b679..647dbe9f 100644 --- a/swh/deposit/tests/data/atom/entry-data0.xml +++ b/swh/deposit/tests/data/atom/entry-data0.xml @@ -5,23 +5,7 @@ <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id> <updated>2017-10-07T15:17:08Z</updated> <author>some awesome author</author> - <applicationCategory>something</applicationCategory> <name>awesome-compiler</name> - <description>This is an awesome compiler destined to -awesomely compile stuff -and other stuff</description> - <keywords>compiler,programming,language</keywords> - <dateCreated>2005-10-07T17:17:08Z</dateCreated> - <datePublished>2005-10-07T17:17:08Z</datePublished> - <releaseNotes>release note</releaseNotes> - <relatedLink>related link</relatedLink> - <sponsor></sponsor> - <programmingLanguage>Awesome</programmingLanguage> - <codeRepository>https://hoster.org/awesome-compiler</codeRepository> - <operatingSystem>GNU/Linux</operatingSystem> - <version>0.0.1</version> - <developmentStatus>running</developmentStatus> - <runtimePlatform>all</runtimePlatform> <swh:deposit> <swh:create_origin> diff --git a/swh/deposit/tests/data/atom/entry-data1.xml b/swh/deposit/tests/data/atom/entry-data1.xml index e1bccc7a..8a75ef12 100644 --- a/swh/deposit/tests/data/atom/entry-data1.xml +++ b/swh/deposit/tests/data/atom/entry-data1.xml @@ -3,21 +3,5 @@ <id>urn:uuid:2225c695-cfb8-4ebb-aaaa-80da344efa6a</id> <updated>2017-10-07T15:17:08Z</updated> <author>some awesome author</author> - <applicationCategory>something</applicationCategory> <name>awesome-compiler</name> - <description>This is an awesome compiler destined to -awesomely compile stuff -and other stuff</description> - <keywords>compiler,programming,language</keywords> - <dateCreated>2005-10-07T17:17:08Z</dateCreated> - <datePublished>2005-10-07T17:17:08Z</datePublished> - <releaseNotes>release note</releaseNotes> - <relatedLink>related link</relatedLink> - <sponsor></sponsor> - <programmingLanguage>Awesome</programmingLanguage> - <codeRepository>https://hoster.org/awesome-compiler</codeRepository> - <operatingSystem>GNU/Linux</operatingSystem> - <version>0.0.1</version> - <developmentStatus>running</developmentStatus> - <runtimePlatform>all</runtimePlatform> </entry> -- GitLab