mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-15 11:35:41 +00:00
simplify error testing
This commit is contained in:
@ -79,13 +79,8 @@ class MiddlewareTests(InvenTreeTestCase):
|
|||||||
|
|
||||||
# Test setup without ignored errors
|
# Test setup without ignored errors
|
||||||
settings.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:
|
try:
|
||||||
raise Http404
|
raise Http404
|
||||||
except Http404:
|
except Http404:
|
||||||
log_error('testpath')
|
log_error('testpath')
|
||||||
check(2)
|
check(1)
|
||||||
|
Reference in New Issue
Block a user