Exemplo n.º 1
0
 def test_reset_link_with_empty_mail(self, monkeypatch):
     AccountProcessor.EMAIL_ENABLED = True
     monkeypatch.setattr(Utility, 'trigger_smtp', self.mock_smtp)
     loop = asyncio.new_event_loop()
     with pytest.raises(Exception):
         loop.run_until_complete(AccountProcessor.send_reset_link(''))
     AccountProcessor.EMAIL_ENABLED = False
Exemplo n.º 2
0
 def test_reset_link_with_mail(self, monkeypatch):
     AccountProcessor.EMAIL_ENABLED = True
     monkeypatch.setattr(Utility, 'trigger_smtp', self.mock_smtp)
     loop = asyncio.new_event_loop()
     loop.run_until_complete(
         AccountProcessor.send_reset_link('*****@*****.**'))
     AccountProcessor.EMAIL_ENABLED = False
     assert True
Exemplo n.º 3
0
 def test_reset_link_with_mail_not_enabled(self, monkeypatch):
     monkeypatch.setattr(Utility, 'trigger_smtp', self.mock_smtp)
     loop = asyncio.new_event_loop()
     with pytest.raises(Exception):
         loop.run_until_complete(
             AccountProcessor.send_reset_link('*****@*****.**'))