Ticket #8523: 8523.remove_unneeded_setupteardown_in_auth_tests.diff
File 8523.remove_unneeded_setupteardown_in_auth_tests.diff, 1.2 KB (added by , 16 years ago) |
---|
-
django/contrib/auth/tests/views.py
94 94 fixtures = ['authtestdata.json'] 95 95 urls = 'django.contrib.auth.urls' 96 96 97 def setUp(self):98 self.old_TEMPLATE_DIRS = settings.TEMPLATE_DIRS99 settings.TEMPLATE_DIRS = (100 os.path.join(101 os.path.dirname(__file__),102 'templates'103 )104 ,)105 106 def tearDown(self):107 settings.TEMPLATE_DIRS = self.old_TEMPLATE_DIRS108 109 97 def login(self, password='password'): 110 98 response = self.client.post('/login/', { 111 99 'username': 'testclient', … … 124 112 self.assertEquals(response.status_code, 200) 125 113 self.assert_("Please enter a correct username and password. Note that both fields are case-sensitive." in response.content) 126 114 127 def logout(self):128 response = self.client.get('/logout/')129 130 115 def test_password_change_fails_with_invalid_old_password(self): 131 116 self.login() 132 117 response = self.client.post('/password_change/', {