Fixed #4779 -- Fixed a couple typos in the `test_client_regress` tests that surfaced when typo was corrected in [5620]. Thanks ferringb@gmail.com.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5621 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
71cb907131
commit
0816f380d2
|
@ -70,7 +70,7 @@ class AssertRedirectsTests(TestCase):
|
||||||
try:
|
try:
|
||||||
self.assertRedirects(response, '/test_client/get_view/')
|
self.assertRedirects(response, '/test_client/get_view/')
|
||||||
except AssertionError, e:
|
except AssertionError, e:
|
||||||
self.assertEquals(str(e), "Response didn't redirect as expected: Reponse code was 301 (expected 302)")
|
self.assertEquals(str(e), "Response didn't redirect as expected: Response code was 301 (expected 302)")
|
||||||
|
|
||||||
def test_incorrect_target(self):
|
def test_incorrect_target(self):
|
||||||
"An assertion is raised if the response redirects to another target"
|
"An assertion is raised if the response redirects to another target"
|
||||||
|
@ -79,10 +79,10 @@ class AssertRedirectsTests(TestCase):
|
||||||
# Should redirect to get_view
|
# Should redirect to get_view
|
||||||
self.assertRedirects(response, '/test_client/some_view/')
|
self.assertRedirects(response, '/test_client/some_view/')
|
||||||
except AssertionError, e:
|
except AssertionError, e:
|
||||||
self.assertEquals(str(e), "Response didn't redirect as expected: Reponse code was 301 (expected 302)")
|
self.assertEquals(str(e), "Response didn't redirect as expected: Response code was 301 (expected 302)")
|
||||||
|
|
||||||
def test_target_page(self):
|
def test_target_page(self):
|
||||||
"An assertion is raised if the reponse redirect target cannot be retrieved as expected"
|
"An assertion is raised if the response redirect target cannot be retrieved as expected"
|
||||||
response = self.client.get('/test_client/double_redirect_view/')
|
response = self.client.get('/test_client/double_redirect_view/')
|
||||||
try:
|
try:
|
||||||
# The redirect target responds with a 301 code, not 200
|
# The redirect target responds with a 301 code, not 200
|
||||||
|
|
Loading…
Reference in New Issue