From a26a68fd51f07319a39d24a333e3d8c483ebcc21 Mon Sep 17 00:00:00 2001 From: Anna Shamray Date: Tue, 11 Jun 2024 16:10:10 +0200 Subject: [PATCH] :test_tube: [https://github.com/maykinmedia/objects-api/issues/361] add regression test for listing versions with incorrect objecttype uuid --- src/objecttypes/tests/v2/test_objectversion_api.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/objecttypes/tests/v2/test_objectversion_api.py b/src/objecttypes/tests/v2/test_objectversion_api.py index 21bef8da..e18d58ba 100644 --- a/src/objecttypes/tests/v2/test_objectversion_api.py +++ b/src/objecttypes/tests/v2/test_objectversion_api.py @@ -51,6 +51,16 @@ def test_get_versions(self): }, ) + def test_get_versions_incorrect_format_uuid(self): + """ + Regression test for https://github.com/maykinmedia/objects-api/issues/361 + """ + url = reverse("objectversion-list", args=["aaa"]) + + response = self.client.get(url) + + self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND) + def test_create_version(self): object_type = ObjectTypeFactory.create() data = {"jsonSchema": JSON_SCHEMA, "status": ObjectVersionStatus.published}