Skip to content

Commit 94dd2de

Browse files
committed
Use force_login
1 parent f7fbd7e commit 94dd2de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

accounts/tests/test_user.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1090,7 +1090,7 @@ def test_username_whitespace(self):
10901090
"""Test that for usernames created before stronger validation was applied, whitespaces are a valid character
10911091
but for new edited ones they are not."""
10921092
userA = User.objects.create_user('user A', email='[email protected]', password='testpass')
1093-
self.client.login(username='user A', password='testpass')
1093+
self.client.force_login(userA)
10941094

10951095
# Test save profile without changing username with whitespaces
10961096
resp = self.client.post(reverse('accounts-edit'), data={'profile-username': ['user A'], 'profile-ui_theme_preference': 'f'})

0 commit comments

Comments
 (0)