diff --git a/InvenTree/InvenTree/test_urls.py b/InvenTree/InvenTree/test_urls.py index 90345aeeb4..0723332d7d 100644 --- a/InvenTree/InvenTree/test_urls.py +++ b/InvenTree/InvenTree/test_urls.py @@ -2,9 +2,6 @@ Validate that all URLs specified in template files are correct. """ -from django import urls -from django.conf import settings - from django.test import TestCase from django.urls import reverse @@ -110,9 +107,13 @@ class URLTest(TestCase): url, pk = url_pair + # TODO: Handle reverse lookup of admin URLs! + if url.startswith("admin:"): + return + if pk: # We will assume that there is at least one item in the database - reverse(url, kwargs={pk: 1}) + reverse(url, kwargs={"pk": 1}) else: reverse(url)