Commit 3e0eb2d7 authored by Alex Gaynor's avatar Alex Gaynor
Browse files

Fixed a number of lint warnings, particularly around unused variables.

parent ebb3e502
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -319,7 +319,7 @@ def load_all_installed_template_libraries():
            libraries = []
        for library_name in libraries:
            try:
                lib = template.get_library(library_name)
                template.get_library(library_name)
            except template.InvalidTemplateLibrary:
                pass

+1 −1
Original line number Diff line number Diff line
@@ -172,7 +172,7 @@ class BasePasswordHasher(object):
            if isinstance(self.library, (tuple, list)):
                name, mod_path = self.library
            else:
                name = mod_path = self.library
                mod_path = self.library
            try:
                module = importlib.import_module(mod_path)
            except ImportError as e:
+1 −1
Original line number Diff line number Diff line
@@ -161,7 +161,7 @@ class AuthContextProcessorTests(TestCase):
        #    Exception RuntimeError: 'maximum recursion depth exceeded while
        #    calling a Python object' in <type 'exceptions.AttributeError'>
        #    ignored"
        query = Q(user=response.context['user']) & Q(someflag=True)
        Q(user=response.context['user']) & Q(someflag=True)

        # Tests for user equality.  This is hard because User defines
        # equality in a non-duck-typing way
+1 −1
Original line number Diff line number Diff line
@@ -307,7 +307,7 @@ class UserChangeFormTest(TestCase):
                fields = ('groups',)

        # Just check we can create it
        form = MyUserForm({})
        MyUserForm({})

    def test_unsuable_password(self):
        user = User.objects.get(username='empty_password')
+4 −4
Original line number Diff line number Diff line
@@ -184,7 +184,7 @@ class PasswordResetTest(AuthViewsTestCase):

    def _test_confirm_start(self):
        # Start by creating the email
        response = self.client.post('/password_reset/', {'email': 'staffmember@example.com'})
        self.client.post('/password_reset/', {'email': 'staffmember@example.com'})
        self.assertEqual(len(mail.outbox), 1)
        return self._read_signup_email(mail.outbox[0])

@@ -328,7 +328,7 @@ class ChangePasswordTest(AuthViewsTestCase):
            })

    def logout(self):
        response = self.client.get('/logout/')
        self.client.get('/logout/')

    def test_password_change_fails_with_invalid_old_password(self):
        self.login()
@@ -350,7 +350,7 @@ class ChangePasswordTest(AuthViewsTestCase):

    def test_password_change_succeeds(self):
        self.login()
        response = self.client.post('/password_change/', {
        self.client.post('/password_change/', {
            'old_password': 'password',
            'new_password1': 'password1',
            'new_password2': 'password1',
@@ -465,7 +465,7 @@ class LoginTest(AuthViewsTestCase):

    def test_login_form_contains_request(self):
        # 15198
        response = self.client.post('/custom_requestauth_login/', {
        self.client.post('/custom_requestauth_login/', {
            'username': 'testclient',
            'password': 'password',
        }, follow=True)
Loading