summaryrefslogtreecommitdiff
path: root/tests/view_tests
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-02-02 20:43:21 -0500
committerTim Graham <timograham@gmail.com>2017-02-03 08:01:45 -0500
commit29f607927fe82e2c8baab171dfa8baf710cd9b83 (patch)
treef525c6c4784ccafe77e01f706093fa6f4a5c9481 /tests/view_tests
parenta21ec12409a5b72d602cd03ee925b6ceb1cd5492 (diff)
Fixed spelling of "nonexistent".
Diffstat (limited to 'tests/view_tests')
-rw-r--r--tests/view_tests/tests/test_defaults.py12
-rw-r--r--tests/view_tests/tests/test_static.py2
-rw-r--r--tests/view_tests/urls.py2
3 files changed, 9 insertions, 7 deletions
diff --git a/tests/view_tests/tests/test_defaults.py b/tests/view_tests/tests/test_defaults.py
index 4b002f3632..62c3fc7619 100644
--- a/tests/view_tests/tests/test_defaults.py
+++ b/tests/view_tests/tests/test_defaults.py
@@ -15,8 +15,10 @@ from ..models import Article, Author, UrlArticle
@override_settings(ROOT_URLCONF='view_tests.urls')
class DefaultsTests(TestCase):
"""Test django views in django/views/defaults.py"""
- non_existing_urls = ['/non_existing_url/', # this is in urls.py
- '/other_non_existing_url/'] # this NOT in urls.py
+ nonexistent_urls = [
+ '/nonexistent_url/', # this is in urls.py
+ '/other_nonexistent_url/', # this NOT in urls.py
+ ]
@classmethod
def setUpTestData(cls):
@@ -41,7 +43,7 @@ class DefaultsTests(TestCase):
def test_page_not_found(self):
"A 404 status is returned by the page_not_found view"
- for url in self.non_existing_urls:
+ for url in self.nonexistent_urls:
response = self.client.get(url)
self.assertEqual(response.status_code, 404)
@@ -60,7 +62,7 @@ class DefaultsTests(TestCase):
The 404 page should have the csrf_token available in the context
"""
# See ticket #14565
- for url in self.non_existing_urls:
+ for url in self.nonexistent_urls:
response = self.client.get(url)
self.assertNotEqual(response.content, 'NOTPROVIDED')
self.assertNotEqual(response.content, '')
@@ -113,7 +115,7 @@ class DefaultsTests(TestCase):
response = self.client.get('/raises403/')
self.assertEqual(response['Content-Type'], 'text/html')
- response = self.client.get('/non_existing_url/')
+ response = self.client.get('/nonexistent_url/')
self.assertEqual(response['Content-Type'], 'text/html')
response = self.client.get('/server_error/')
diff --git a/tests/view_tests/tests/test_static.py b/tests/view_tests/tests/test_static.py
index 01b4c2de7d..f7e5604d06 100644
--- a/tests/view_tests/tests/test_static.py
+++ b/tests/view_tests/tests/test_static.py
@@ -104,7 +104,7 @@ class StaticTests(SimpleTestCase):
self.assertEqual(len(response_content), int(response['Content-Length']))
def test_404(self):
- response = self.client.get('/%s/non_existing_resource' % self.prefix)
+ response = self.client.get('/%s/nonexistent_resource' % self.prefix)
self.assertEqual(404, response.status_code)
def test_index(self):
diff --git a/tests/view_tests/urls.py b/tests/view_tests/urls.py
index c046336b7f..26130f37bb 100644
--- a/tests/view_tests/urls.py
+++ b/tests/view_tests/urls.py
@@ -56,7 +56,7 @@ urlpatterns = [
url(r'^$', views.index_page),
# Default views
- url(r'^non_existing_url/', partial(defaults.page_not_found, exception=None)),
+ url(r'^nonexistent_url/', partial(defaults.page_not_found, exception=None)),
url(r'^server_error/', defaults.server_error),
# a view that raises an exception for the debug view