mirror of
https://github.com/django/django.git
synced 2025-01-18 14:24:39 +00:00
Refs #35090 -- Fixed urlpatterns.tests.SimplifiedURLTests when run in reverse.
Regression in 9cb1ffa67bb0d13f86c2d4627428fcaa4513136d.
This commit is contained in:
parent
37373d9ae9
commit
a7af1e2756
@ -13,7 +13,7 @@ from django.urls import (
|
|||||||
resolve,
|
resolve,
|
||||||
reverse,
|
reverse,
|
||||||
)
|
)
|
||||||
from django.urls.converters import IntConverter
|
from django.urls.converters import REGISTERED_CONVERTERS, IntConverter
|
||||||
from django.views import View
|
from django.views import View
|
||||||
|
|
||||||
from .converters import Base64Converter, DynamicConverter
|
from .converters import Base64Converter, DynamicConverter
|
||||||
@ -209,8 +209,12 @@ class SimplifiedURLTests(SimpleTestCase):
|
|||||||
|
|
||||||
def test_warning_override_converter(self):
|
def test_warning_override_converter(self):
|
||||||
msg = "Converter 'base64' is already registered."
|
msg = "Converter 'base64' is already registered."
|
||||||
with self.assertRaisesMessage(ValueError, msg):
|
try:
|
||||||
register_converter(Base64Converter, "base64")
|
with self.assertRaisesMessage(ValueError, msg):
|
||||||
|
register_converter(Base64Converter, "base64")
|
||||||
|
register_converter(Base64Converter, "base64")
|
||||||
|
finally:
|
||||||
|
REGISTERED_CONVERTERS.pop("base64", None)
|
||||||
|
|
||||||
def test_invalid_view(self):
|
def test_invalid_view(self):
|
||||||
msg = "view must be a callable or a list/tuple in the case of include()."
|
msg = "view must be a callable or a list/tuple in the case of include()."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user