mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed spelling of "nonexistent".
This commit is contained in:
@@ -337,11 +337,11 @@ class URLPatternReverse(SimpleTestCase):
|
||||
|
||||
def test_view_not_found_message(self):
|
||||
msg = (
|
||||
"Reverse for 'non-existent-view' not found. 'non-existent-view' "
|
||||
"Reverse for 'nonexistent-view' not found. 'nonexistent-view' "
|
||||
"is not a valid view function or pattern name."
|
||||
)
|
||||
with self.assertRaisesMessage(NoReverseMatch, msg):
|
||||
reverse('non-existent-view')
|
||||
reverse('nonexistent-view')
|
||||
|
||||
def test_no_args_message(self):
|
||||
msg = "Reverse for 'places' with no arguments not found. 1 pattern(s) tried:"
|
||||
@@ -410,8 +410,8 @@ class ResolverTests(SimpleTestCase):
|
||||
"""
|
||||
urls = 'urlpatterns_reverse.named_urls'
|
||||
# this list matches the expected URL types and names returned when
|
||||
# you try to resolve a non-existent URL in the first level of included
|
||||
# URLs in named_urls.py (e.g., '/included/non-existent-url')
|
||||
# you try to resolve a nonexistent URL in the first level of included
|
||||
# URLs in named_urls.py (e.g., '/included/nonexistent-url')
|
||||
url_types_names = [
|
||||
[{'type': RegexURLPattern, 'name': 'named-url1'}],
|
||||
[{'type': RegexURLPattern, 'name': 'named-url2'}],
|
||||
@@ -422,7 +422,7 @@ class ResolverTests(SimpleTestCase):
|
||||
[{'type': RegexURLResolver}, {'type': RegexURLResolver}],
|
||||
]
|
||||
with self.assertRaisesMessage(Resolver404, 'tried') as cm:
|
||||
resolve('/included/non-existent-url', urlconf=urls)
|
||||
resolve('/included/nonexistent-url', urlconf=urls)
|
||||
e = cm.exception
|
||||
# make sure we at least matched the root ('/') url resolver:
|
||||
self.assertIn('tried', e.args[0])
|
||||
@@ -594,7 +594,7 @@ class NamespaceTests(SimpleTestCase):
|
||||
reverse('inner-nothing', kwargs={'arg1': 42, 'arg2': 37})
|
||||
|
||||
def test_non_existent_namespace(self):
|
||||
"Non-existent namespaces raise errors"
|
||||
"Nonexistent namespaces raise errors"
|
||||
with self.assertRaises(NoReverseMatch):
|
||||
reverse('blahblah:urlobject-view')
|
||||
with self.assertRaises(NoReverseMatch):
|
||||
@@ -804,20 +804,20 @@ class NamespaceTests(SimpleTestCase):
|
||||
"current_app should either match the whole path or shouldn't be used"
|
||||
self.assertEqual(
|
||||
'/ns-included1/test4/inner/',
|
||||
reverse('inc-ns1:testapp:urlobject-view', current_app='non-existent:test-ns3')
|
||||
reverse('inc-ns1:testapp:urlobject-view', current_app='nonexistent:test-ns3')
|
||||
)
|
||||
self.assertEqual(
|
||||
'/ns-included1/test4/inner/37/42/',
|
||||
reverse('inc-ns1:testapp:urlobject-view', args=[37, 42], current_app='non-existent:test-ns3')
|
||||
reverse('inc-ns1:testapp:urlobject-view', args=[37, 42], current_app='nonexistent:test-ns3')
|
||||
)
|
||||
self.assertEqual(
|
||||
'/ns-included1/test4/inner/42/37/',
|
||||
reverse('inc-ns1:testapp:urlobject-view', kwargs={'arg1': 42, 'arg2': 37},
|
||||
current_app='non-existent:test-ns3')
|
||||
current_app='nonexistent:test-ns3')
|
||||
)
|
||||
self.assertEqual(
|
||||
'/ns-included1/test4/inner/+%5C$*/',
|
||||
reverse('inc-ns1:testapp:urlobject-special-view', current_app='non-existent:test-ns3')
|
||||
reverse('inc-ns1:testapp:urlobject-special-view', current_app='nonexistent:test-ns3')
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user