diff --git a/test/unit/app/managers/test_UserManager.py b/test/unit/app/managers/test_UserManager.py index c160a39bd2da..b8286838d103 100644 --- a/test/unit/app/managers/test_UserManager.py +++ b/test/unit/app/managers/test_UserManager.py @@ -233,14 +233,14 @@ def validate_send_email(frm, to, subject, body, config, html=None): assert result is None def test_reset_email_user_deleted(self): - self.trans.app.config.allow_user_deletion = True - self.log("should not produce the password reset email if user is deleted") - user_email = "user@nopassword.com" - user = self.user_manager.create(email=user_email, username="nopassword") - self.user_manager.delete(user) - assert user.deleted is True - message = self.user_manager.send_reset_email(self.trans, {"email": user_email}) - assert message == "Failed to produce password reset token. User not found." + self.trans.app.config.allow_user_deletion = True + self.log("should not produce the password reset email if user is deleted") + user_email = "user@nopassword.com" + user = self.user_manager.create(email=user_email, username="nopassword") + self.user_manager.delete(user) + assert user.deleted is True + message = self.user_manager.send_reset_email(self.trans, {"email": user_email}) + assert message == "Failed to produce password reset token. User not found." def test_get_user_by_identity(self): # return None if username/email not found