Esempio n. 1
0
 def refresh_token(self):
   new_token = create_token()
   while not ensure_token_uniqueness(new_token):
       new_token = create_token()
   self.token = new_token
Esempio n. 2
0
 def test_ensure_token_uniqueness(self):
   post = PostFactory()
   token = post.token
   assert not ensure_token_uniqueness(token), "Token was unique despite not being"