예제 #1
0
 def test_overwrite_password_with_valid_entries(self, monkeypatch):
     monkeypatch.setattr(Utility, 'trigger_smtp', self.mock_smtp)
     token = Utility.generate_token('*****@*****.**')
     loop = asyncio.new_event_loop()
     loop.run_until_complete(
         AccountProcessor.overwrite_password(token, "Welcome@3"))
     assert True
예제 #2
0
 def test_overwrite_password_with_empty_password_string(self, monkeypatch):
     monkeypatch.setattr(Utility, 'trigger_smtp', self.mock_smtp)
     loop = asyncio.new_event_loop()
     with pytest.raises(Exception):
         loop.run_until_complete(
             AccountProcessor.overwrite_password(
                 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJtYWlsX2lkIjoiaW50ZWcxQGdtYWlsLmNvbSJ9.Ycs1ROb1w6MMsx2WTA4vFu3-jRO8LsXKCQEB3fkoU20',
                 " "))
예제 #3
0
 def test_overwrite_password_with_invalid_token(self, monkeypatch):
     monkeypatch.setattr(Utility, 'trigger_smtp', self.mock_smtp)
     loop = asyncio.new_event_loop()
     with pytest.raises(Exception):
         loop.run_until_complete(
             AccountProcessor.overwrite_password('fgh', "asdfghj@1"))