def test_verification_list(self): deploy = db.deployment_create({}) v1 = db.verification_create( self.verifier["uuid"], deploy["uuid"], ["foo", "bar"], {}) v2 = self._create_verification() vs = db.verification_list(self.verifier["uuid"]) self.assertEqual(sorted([v1["uuid"], v2["uuid"]]), sorted([v["uuid"] for v in vs])) vs = db.verification_list(self.verifier["uuid"], deploy["uuid"]) self.assertEqual(1, len(vs)) self.assertEqual(v1["uuid"], vs[0]["uuid"]) vs = db.verification_list(tags=["bar"]) self.assertEqual(1, len(vs)) self.assertEqual(v1["uuid"], vs[0]["uuid"]) v2 = db.verification_update(v2["uuid"], status="foo") vs = db.verification_list(status="foo") self.assertEqual(1, len(vs)) self.assertEqual(v2["uuid"], vs[0]["uuid"])
def test_verification_list(self): deploy = db.deployment_create({}) v1 = db.verification_create(self.verifier["uuid"], deploy["uuid"], ["foo", "bar"], {}) v2 = self._create_verification() vs = db.verification_list(self.verifier["uuid"]) self.assertEqual(sorted([v1["uuid"], v2["uuid"]]), sorted([v["uuid"] for v in vs])) vs = db.verification_list(self.verifier["uuid"], deploy["uuid"]) self.assertEqual(1, len(vs)) self.assertEqual(v1["uuid"], vs[0]["uuid"]) vs = db.verification_list(tags=["bar"]) self.assertEqual(1, len(vs)) self.assertEqual(v1["uuid"], vs[0]["uuid"]) v2 = db.verification_update(v2["uuid"], status="foo") vs = db.verification_list(status="foo") self.assertEqual(1, len(vs)) self.assertEqual(v2["uuid"], vs[0]["uuid"])
def _create_verification(self): deployment_uuid = self.deploy["uuid"] return db.verification_create(deployment_uuid)
def __init__(self, db_object=None, deployment_uuid=None): if db_object: self.db_object = db_object else: self.db_object = db.verification_create(deployment_uuid)
def _create_verification(self): verifier_uuid = self.verifier["uuid"] deployment_uuid = self.deploy["uuid"] return db.verification_create(verifier_uuid, deployment_uuid, [], {})
def create(cls, verifier_id, deployment_id, tags=None, run_args=None): return cls( db.verification_create(verifier_id, deployment_id, tags, run_args))
def _create_verification(self, tags=None, env_uuid=None): tags = tags or [] verifier_uuid = self.verifier["uuid"] env_uuid = env_uuid or self.env["uuid"] return db.verification_create(verifier_uuid, env_uuid, tags, {})
def create(cls, verifier_id, deployment_id, tags=None, run_args=None): return cls(db.verification_create( verifier_id, deployment_id, tags, run_args))