def test_verifier_list(self): v1 = db.verifier_create("a1", "b1", "c1", "d1", "e1", False) v2 = db.verifier_create("a2", "b2", "c2", "d2", "e2", False) vs = db.verifier_list() self.assertEqual(sorted([v1["uuid"], v2["uuid"]]), sorted([v["uuid"] for v in vs])) v1 = db.verifier_update(v1["uuid"], status="foo") vs = db.verifier_list(status="foo") self.assertEqual(1, len(vs)) self.assertEqual(v1["uuid"], vs[0]["uuid"])
def test_verifier_list(self): v1 = db.verifier_create("a1", "b1", "c1", "d1", "e1", False) v2 = db.verifier_create("a2", "b2", "c2", "d2", "e2", False) vs = db.verifier_list() self.assertEqual(sorted([v1["uuid"], v2["uuid"]]), sorted([v["uuid"] for v in vs])) v1 = db.verifier_update(v1["uuid"], status="foo") vs = db.verifier_list(status="foo") self.assertEqual(1, len(vs)) self.assertEqual(v1["uuid"], vs[0]["uuid"])
def list(cls, status=None): return [cls(db_entry) for db_entry in db.verifier_list(status)]
def list(cls, status=None): return [cls(db_entry) for db_entry in db.verifier_list(status)]