Add test to replace removed coverage

This commit is contained in:
Matthias 2022-05-11 17:08:12 +02:00
parent 5cb4f0e73d
commit 2a551e7ab9
No known key found for this signature in database
GPG Key ID: AB6D0E6C4CB65093

View File

@ -96,6 +96,13 @@ class HTMLAPITests(TestCase):
response = self.client.get(url, HTTP_ACCEPT='text/html') response = self.client.get(url, HTTP_ACCEPT='text/html')
self.assertEqual(response.status_code, 200) self.assertEqual(response.status_code, 200)
def test_not_found(self):
"""Test that the NotFoundView is working"""
url = reverse('api-404')
# Check JSON response
response = self.client.get(url, HTTP_ACCEPT='application/json')
self.assertEqual(response.status_code, 404)
class APITests(InvenTreeAPITestCase): class APITests(InvenTreeAPITestCase):
""" Tests for the InvenTree API """ """ Tests for the InvenTree API """