This commit is contained in:
Oliver 2021-10-30 14:11:03 +11:00
parent 29c913b553
commit 2830fc3c7f
2 changed files with 5 additions and 2 deletions

View File

@ -107,6 +107,10 @@ class URLTest(TestCase):
url, pk = url_pair
# Ignore "renaming"
if pk.startswith('as '):
pk = None
# TODO: Handle reverse lookup of admin URLs!
if url.startswith("admin:"):
return
@ -115,7 +119,7 @@ class URLTest(TestCase):
if url.startswith("account_"):
return
if pk and pk not in ['as']:
if pk:
# We will assume that there is at least one item in the database
reverse(url, kwargs={"pk": 1})
else:

View File

@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core import exceptions
from django.utils.translation import ugettext_lazy as _
from django.conf.urls import url, include