def test_get_user_details_account_inactive(self, mock_account_inactive):
     with pytest.raises(ValidationError):
         user_details = AccountProcessor.get_user_details("*****@*****.**")
         assert all(user_details[key] is False if key ==
                    "is_integration_user" else user_details[key]
                    for key in AccountProcessor.get_user_details(
                        user_details["email"]).keys())
 def test_get_user_details(self):
     user = AccountProcessor.get_user_details("*****@*****.**")
     assert all(
         user[key] is False if key == "is_integration_user" else user[key]
         for key in user.keys())
Beispiel #3
0
 def test_get_user_details_bot_inactive(self, mock_bot_inactive,
                                        monkeypatch):
     monkeypatch.setattr(AccountProcessor, 'EMAIL_ENABLED', True)
     with pytest.raises(AppException) as e:
         AccountProcessor.get_user_details("*****@*****.**")
     assert str(e).__contains__('Please verify your mail')