summaryrefslogtreecommitdiff
path: root/tests/regressiontests/test_client_regress/models.py
diff options
context:
space:
mode:
authorJustin Bronn <jbronn@gmail.com>2008-08-05 17:15:33 +0000
committerJustin Bronn <jbronn@gmail.com>2008-08-05 17:15:33 +0000
commitaa239e3e5405933af6a29dac3cf587b59a099927 (patch)
treeea2cbd139c9a8cf84c09e0b2008bff70e05927ef /tests/regressiontests/test_client_regress/models.py
parent45b73c9a4685809236f84046cc7ffd32a50db958 (diff)
downloaddjango-attic/gis.tar.gz
gis: Merged revisions 7981-8001,8003-8011,8013-8033,8035-8036,8038-8039,8041-8063,8065-8076,8078-8139,8141-8154,8156-8214 via svnmerge from trunk.archive/attic/gisattic/gis
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@8215 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/test_client_regress/models.py')
-rw-r--r--tests/regressiontests/test_client_regress/models.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/regressiontests/test_client_regress/models.py b/tests/regressiontests/test_client_regress/models.py
index 1eb55e312e..3518df3b9f 100644
--- a/tests/regressiontests/test_client_regress/models.py
+++ b/tests/regressiontests/test_client_regress/models.py
@@ -1,12 +1,10 @@
"""
Regression tests for the Test Client, especially the customized assertions.
-
"""
+
from django.test import Client, TestCase
from django.core.urlresolvers import reverse
from django.core.exceptions import SuspiciousOperation
-import os
-import sha
class AssertContainsTests(TestCase):
def test_contains(self):
@@ -24,7 +22,7 @@ class AssertContainsTests(TestCase):
self.assertNotContains(response, 'once')
except AssertionError, e:
self.assertEquals(str(e), "Response should not contain 'once'")
-
+
try:
self.assertContains(response, 'never', 1)
except AssertionError, e:
@@ -287,7 +285,7 @@ class URLEscapingTests(TestCase):
class ExceptionTests(TestCase):
fixtures = ['testdata.json']
-
+
def test_exception_cleared(self):
"#5836 - A stale user exception isn't re-raised by the test client."
@@ -300,7 +298,7 @@ class ExceptionTests(TestCase):
pass
# At this point, an exception has been raised, and should be cleared.
-
+
# This next operation should be successful; if it isn't we have a problem.
login = self.client.login(username='staff', password='password')
self.failUnless(login, 'Could not log in')
@@ -309,7 +307,7 @@ class ExceptionTests(TestCase):
except SuspiciousOperation:
self.fail("Staff should be able to visit this page")
-# We need two different tests to check URLconf subsitution - one to check
+# We need two different tests to check URLconf substitution - one to check
# it was changed, and another one (without self.urls) to check it was reverted on
# teardown. This pair of tests relies upon the alphabetical ordering of test execution.
class UrlconfSubstitutionTests(TestCase):