2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-05-14 05:27:34 +00:00

Add test for wrong token

This commit is contained in:
Matthias
2022-05-15 00:44:26 +02:00
parent 2483b746cf
commit 40fa86152e
+3
View File
@@ -59,5 +59,8 @@ class MiddlewareTests(TestCase):
# request with token
self.check_path(reverse('settings.js'), HTTP_Authorization=f'Token {token}')
# Request with broken token
self.check_path(reverse('settings.js'), 401, HTTP_Authorization=f'Token abcd123')
# should still fail without token
self.check_path(reverse('settings.js'), 401)