Kaydet (Commit) 2cd6db68 authored tarafından Jacob Kaplan-Moss's avatar Jacob Kaplan-Moss

Fixed a few Python2.3-related bugs in the tests (see #3396). A few more left, though.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4614 bcc190cf-cafb-0310-a4f2-bffc1f526a37
üst 18ecf9dc
...@@ -97,7 +97,7 @@ class ClientTest(unittest.TestCase): ...@@ -97,7 +97,7 @@ class ClientTest(unittest.TestCase):
# Request a page that requires a login # Request a page that requires a login
response = self.client.login('/test_client/login_protected_view/', 'testclient', 'password') response = self.client.login('/test_client/login_protected_view/', 'testclient', 'password')
self.assertTrue(response) self.failUnless(response)
self.assertEqual(response.status_code, 200) self.assertEqual(response.status_code, 200)
self.assertEqual(response.context['user'].username, 'testclient') self.assertEqual(response.context['user'].username, 'testclient')
self.assertEqual(response.template.name, 'Login Template') self.assertEqual(response.template.name, 'Login Template')
...@@ -106,7 +106,7 @@ class ClientTest(unittest.TestCase): ...@@ -106,7 +106,7 @@ class ClientTest(unittest.TestCase):
"Request a page that is protected with @login, but use bad credentials" "Request a page that is protected with @login, but use bad credentials"
response = self.client.login('/test_client/login_protected_view/', 'otheruser', 'nopassword') response = self.client.login('/test_client/login_protected_view/', 'otheruser', 'nopassword')
self.assertFalse(response) self.failIf(response)
def test_session_modifying_view(self): def test_session_modifying_view(self):
"Request a page that modifies the session" "Request a page that modifies the session"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment