diff --git a/codeforlife/user/tests/auth/password_validators/test_independent.py b/codeforlife/user/tests/auth/password_validators/test_independent.py index 2b52fe4c..8bd96c06 100644 --- a/codeforlife/user/tests/auth/password_validators/test_independent.py +++ b/codeforlife/user/tests/auth/password_validators/test_independent.py @@ -9,13 +9,10 @@ class TestIndependentPasswordValidator(PasswordValidatorTestCase): - @classmethod - def setUpClass(cls): - cls.user = User.objects.filter( - new_teacher__isnull=True, new_student__isnull=True - ).first() - cls.validator = IndependentPasswordValidator() - super(TestIndependentPasswordValidator, cls).setUpClass() + user = User.objects.filter( + new_teacher__isnull=True, new_student__isnull=True + ).first() + validator = IndependentPasswordValidator() def test_validate__password_too_short(self): password = "fxwSn4}" diff --git a/codeforlife/user/tests/auth/password_validators/test_student.py b/codeforlife/user/tests/auth/password_validators/test_student.py index 7485751f..256b0e15 100644 --- a/codeforlife/user/tests/auth/password_validators/test_student.py +++ b/codeforlife/user/tests/auth/password_validators/test_student.py @@ -9,11 +9,8 @@ class TestStudentPasswordValidator(PasswordValidatorTestCase): - @classmethod - def setUpClass(cls): - cls.user = User.objects.filter(new_student__isnull=False).first() - cls.validator = StudentPasswordValidator() - super(TestStudentPasswordValidator, cls).setUpClass() + user = User.objects.filter(new_student__isnull=False).first() + validator = StudentPasswordValidator() def test_validate__password_too_short(self): password = "fxwSn" diff --git a/codeforlife/user/tests/auth/password_validators/test_teacher.py b/codeforlife/user/tests/auth/password_validators/test_teacher.py index cbcdaeef..552bf169 100644 --- a/codeforlife/user/tests/auth/password_validators/test_teacher.py +++ b/codeforlife/user/tests/auth/password_validators/test_teacher.py @@ -9,11 +9,8 @@ class TestTeacherPasswordValidator(PasswordValidatorTestCase): - @classmethod - def setUpClass(cls): - cls.user = User.objects.first() - cls.validator = TeacherPasswordValidator() - super(TestTeacherPasswordValidator, cls).setUpClass() + user = User.objects.first() + validator = TeacherPasswordValidator() def test_validate__password_too_short(self): password = "fxwSn4}PW"