mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 12:35:46 +00:00
extent no found api tests
This commit is contained in:
@ -58,9 +58,11 @@ class HTMLAPITests(InvenTreeTestCase):
|
|||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
|
|
||||||
def test_not_found(self):
|
def test_not_found(self):
|
||||||
"""Test that the NotFoundView is working."""
|
"""Test that the NotFoundView is working with all available methods."""
|
||||||
response = self.client.get('/api/anc')
|
methods = ['options', 'get', 'post', 'patch', 'put', 'delete']
|
||||||
self.assertEqual(response.status_code, 404)
|
for method in methods:
|
||||||
|
response = getattr(self.client, method)('/api/anc')
|
||||||
|
self.assertEqual(response.status_code, 404)
|
||||||
|
|
||||||
|
|
||||||
class APITests(InvenTreeAPITestCase):
|
class APITests(InvenTreeAPITestCase):
|
||||||
|
Reference in New Issue
Block a user