Ticket #8523: 8523.remove_unneeded_setupteardown_in_auth_tests.diff

File 8523.remove_unneeded_setupteardown_in_auth_tests.diff, 1.2 KB (added by mtrichardson, 7 years ago)

Remove improper setUp/tearDown methods on ChangePasswordTest

  • django/contrib/auth/tests/views.py

     
    9494    fixtures = ['authtestdata.json']
    9595    urls = 'django.contrib.auth.urls'
    9696
    97     def setUp(self):
    98         self.old_TEMPLATE_DIRS = settings.TEMPLATE_DIRS
    99         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_DIRS
    108 
    10997    def login(self, password='password'):
    11098        response = self.client.post('/login/', {
    11199            'username': 'testclient',
     
    124112        self.assertEquals(response.status_code, 200)
    125113        self.assert_("Please enter a correct username and password. Note that both fields are case-sensitive." in response.content)
    126114
    127     def logout(self):
    128         response = self.client.get('/logout/')
    129 
    130115    def test_password_change_fails_with_invalid_old_password(self):
    131116        self.login()
    132117        response = self.client.post('/password_change/', {
Back to Top