mirror of
https://github.com/django/django.git
synced 2025-10-27 15:46:10 +00:00
Refs #33476 -- Reformatted code with Black.
This commit is contained in:
committed by
Mariusz Felisiak
parent
f68fa8b45d
commit
9c19aff7c7
@@ -8,7 +8,9 @@ from django.test import TestCase
|
||||
class TestAuthenticationMiddleware(TestCase):
|
||||
@classmethod
|
||||
def setUpTestData(cls):
|
||||
cls.user = User.objects.create_user('test_user', 'test@example.com', 'test_password')
|
||||
cls.user = User.objects.create_user(
|
||||
"test_user", "test@example.com", "test_password"
|
||||
)
|
||||
|
||||
def setUp(self):
|
||||
self.middleware = AuthenticationMiddleware(lambda req: HttpResponse())
|
||||
@@ -24,7 +26,7 @@ class TestAuthenticationMiddleware(TestCase):
|
||||
|
||||
def test_changed_password_invalidates_session(self):
|
||||
# After password change, user should be anonymous
|
||||
self.user.set_password('new_password')
|
||||
self.user.set_password("new_password")
|
||||
self.user.save()
|
||||
self.middleware(self.request)
|
||||
self.assertIsNotNone(self.request.user)
|
||||
|
||||
Reference in New Issue
Block a user