Ticket #3396: test_client.patch
File test_client.patch, 945 bytes (added by , 18 years ago) |
---|
-
tests/modeltests/test_client/models.py
89 89 90 90 # Request a page that requires a login 91 91 response = self.client.login('/test_client/login_protected_view/', 'testclient', 'password') 92 self. assertTrue(response)92 self.failUnless(response) 93 93 self.assertEqual(response.status_code, 200) 94 94 self.assertEqual(response.context['user'].username, 'testclient') 95 95 self.assertEqual(response.template.name, 'Login Template') … … 98 98 "Request a page that is protected with @login, but use bad credentials" 99 99 100 100 response = self.client.login('/test_client/login_protected_view/', 'otheruser', 'nopassword') 101 self. assertFalse(response)101 self.failIf(response)