@@ -30,7 +30,7 @@ def test_password_change(self):
30
30
self .client .login (username = "alice" , password = passwords [- 1 ])
31
31
response = self .client .get (reverse ("password_change" ))
32
32
self .assertEqual (response .status_code , 200 )
33
- self .failUnless (
33
+ self .assertTrue (
34
34
isinstance (response .context ["form" ], PasswordPoliciesChangeForm )
35
35
)
36
36
self .assertTemplateUsed (response , "registration/password_change_form.html" )
@@ -50,7 +50,7 @@ def test_password_change_failure(self):
50
50
self .client .login (username = "alice" , password = passwords [- 1 ])
51
51
response = self .client .post (reverse ("password_change" ), data = data )
52
52
self .assertEqual (response .status_code , 200 )
53
- self .failIf (response .context ["form" ].is_valid ())
53
+ self .assertFalse (response .context ["form" ].is_valid ())
54
54
self .assertFormError (response , "form" , field = "old_password" , errors = msg )
55
55
self .client .logout ()
56
56
@@ -107,7 +107,7 @@ def test_password_change_wrong_validators(self):
107
107
self .client .login (username = "alice" , password = data ["old_password" ])
108
108
response = self .client .post (reverse ("password_change" ), data = data )
109
109
self .assertEqual (response .status_code , 200 )
110
- self .failIf (response .context ["form" ].is_valid ())
110
+ self .assertFalse (response .context ["form" ].is_valid ())
111
111
self .assertFormError (response , "form" , field = "new_password2" , errors = msg )
112
112
self .client .logout ()
113
113
0 commit comments