mirror of
https://github.com/django/django.git
synced 2025-07-24 05:36:15 +00:00
Fixed #26013 -- Moved django.core.urlresolvers to django.urls.
Thanks to Tim Graham for the review.
This commit is contained in:
parent
df3d5b1d73
commit
16411b8400
117 changed files with 961 additions and 922 deletions
|
@ -4,10 +4,10 @@ from __future__ import unicode_literals
|
|||
import sys
|
||||
|
||||
from django.contrib.auth.models import Group
|
||||
from django.core import urlresolvers
|
||||
from django.template import Context, Engine, TemplateSyntaxError
|
||||
from django.template.base import UNKNOWN_SOURCE
|
||||
from django.test import SimpleTestCase, override_settings
|
||||
from django.urls import NoReverseMatch
|
||||
|
||||
|
||||
class TemplateTests(SimpleTestCase):
|
||||
|
@ -26,7 +26,7 @@ class TemplateTests(SimpleTestCase):
|
|||
"""
|
||||
t = Engine(debug=True).from_string('{% url will_not_match %}')
|
||||
c = Context()
|
||||
with self.assertRaises(urlresolvers.NoReverseMatch):
|
||||
with self.assertRaises(NoReverseMatch):
|
||||
t.render(c)
|
||||
|
||||
def test_url_reverse_view_name(self):
|
||||
|
@ -38,7 +38,7 @@ class TemplateTests(SimpleTestCase):
|
|||
c = Context()
|
||||
try:
|
||||
t.render(c)
|
||||
except urlresolvers.NoReverseMatch:
|
||||
except NoReverseMatch:
|
||||
tb = sys.exc_info()[2]
|
||||
depth = 0
|
||||
while tb.tb_next is not None:
|
||||
|
@ -118,7 +118,7 @@ class TemplateTests(SimpleTestCase):
|
|||
"""
|
||||
engine = Engine(app_dirs=True)
|
||||
t = engine.get_template('included_content.html')
|
||||
with self.assertRaises(urlresolvers.NoReverseMatch):
|
||||
with self.assertRaises(NoReverseMatch):
|
||||
t.render(Context())
|
||||
|
||||
def test_debug_tag_non_ascii(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue