From 1a4e40b9d35f2a44818758ed9a472061b5f6767c Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Wed, 5 Feb 2025 01:39:09 +0100 Subject: [PATCH] extent no found api tests --- src/backend/InvenTree/InvenTree/test_api.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/backend/InvenTree/InvenTree/test_api.py b/src/backend/InvenTree/InvenTree/test_api.py index 598ff10920..dff75e4388 100644 --- a/src/backend/InvenTree/InvenTree/test_api.py +++ b/src/backend/InvenTree/InvenTree/test_api.py @@ -58,9 +58,11 @@ class HTMLAPITests(InvenTreeTestCase): self.assertEqual(response.status_code, 200) def test_not_found(self): - """Test that the NotFoundView is working.""" - response = self.client.get('/api/anc') - self.assertEqual(response.status_code, 404) + """Test that the NotFoundView is working with all available methods.""" + methods = ['options', 'get', 'post', 'patch', 'put', 'delete'] + for method in methods: + response = getattr(self.client, method)('/api/anc') + self.assertEqual(response.status_code, 404) class APITests(InvenTreeAPITestCase):