2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-15 03:25:42 +00:00

simplify error testing

This commit is contained in:
Matthias Mair
2024-10-28 23:01:41 +01:00
parent 1106f20165
commit efe3299130

View File

@ -79,13 +79,8 @@ class MiddlewareTests(InvenTreeTestCase):
# Test setup without ignored errors
settings.IGNORED_ERRORS = []
response = self.client.get(reverse('api-part-detail', kwargs={'pk': 9999}))
self.assertEqual(response.status_code, 404)
check(1)
# Test manual logging
try:
raise Http404
except Http404:
log_error('testpath')
check(2)
check(1)