def testLinksExpire(self): activate_link = generate_activation_link(self.TEST_USER_ID) reset_link = generate_reset_link(self.TEST_USER_ID) time.sleep(1) assert not verify_activation_link(activate_link, 0) assert not verify_reset_link(reset_link, 0)
def testWrongLinksShouldFail(self): activate_link = generate_activation_link(self.TEST_USER_ID) reset_link = generate_reset_link(self.TEST_USER_ID) assert not verify_reset_link(activate_link) assert not verify_activation_link(reset_link)
def testResetLink(self): link = generate_reset_link(self.TEST_USER_ID) payload = verify_reset_link(link) assert payload assert payload['id']