def test_exists_true(self): rep = UserRepository() user_id = rep.create('name', 'password') boolean = rep.exists(user_id) self.assertTrue(boolean) rep.delete(user_id)
def test_exists_false(self): rep = UserRepository() boolean = rep.exists('5bd8ad1daf') self.assertFalse(boolean)
def test_delete_existed(self): rep = UserRepository() id1 = rep.create('name', 'password') rep.delete(id1) self.assertFalse(rep.exists(id1))