Refs #27804 -- Used subTest() in several tests.

This commit is contained in:
Bruno Alla 2017-03-07 21:00:43 +00:00 committed by Tim Graham
parent 91b2bc3e70
commit 6092ea8fa6
19 changed files with 324 additions and 262 deletions

View file

@ -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()