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:
@ -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)
|
||||
|
Reference in New Issue
Block a user