PEP fixes

This commit is contained in:
Oliver 2021-07-21 10:42:24 +10:00
parent 2d6a78ffb8
commit 8cb336f581

View File

@ -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)