Commits

Tobias McNulty committed afeb80b

clean up tests for #12148

  • Participants
  • Parent commits 99cb1f4
  • Branches ticket-12148

Comments (0)

Files changed (1)

django/contrib/auth/tests/auth_backends.py

     def test_invalid_user_valid_backend(self): 
         self.set_up_session(uid=self.invalid_uid, backend=self.backend) 
         user = auth.get_user(self.request) 
-        self.assert_(isinstance(user,AnonymousUser))
+        self.assert_(isinstance(user, AnonymousUser))
        
     def test_valid_user_backend_not_in_settings(self): 
-        self.set_up_session(uid=self.invalid_uid, backend=self.backend) 
-        settings.AUTHENTICATION_BACKENDS = tuple()
+        self.set_up_session(uid=self.invalid_uid,
+                            backend='non.existent.auth.backend') 
         user = auth.get_user(self.request) 
-        self.assert_(isinstance(user,AnonymousUser)) 
+        self.assert_(isinstance(user, AnonymousUser))