mirror of
https://github.com/django/django.git
synced 2025-08-03 02:23:12 +00:00
Refs #27804 -- Used subTest() in several tests.
This commit is contained in:
parent
91b2bc3e70
commit
6092ea8fa6
19 changed files with 324 additions and 262 deletions
|
@ -161,7 +161,7 @@ class AbstractBaseUserTests(TestCase):
|
|||
# The normalization happens in AbstractBaseUser.clean()
|
||||
ohm_username = 'iamtheΩ' # U+2126 OHM SIGN
|
||||
for model in ('auth.User', 'auth_tests.CustomUser'):
|
||||
with self.settings(AUTH_USER_MODEL=model):
|
||||
with self.subTest(model=model), self.settings(AUTH_USER_MODEL=model):
|
||||
User = get_user_model()
|
||||
user = User(**{User.USERNAME_FIELD: ohm_username, 'password': 'foo'})
|
||||
user.clean()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue