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): another_env = db.env_create( self.id() + "2", "INIT", "", {}, {}, {}, []) v1 = self._create_verification(tags=["foo", "bar"], env_uuid=another_env["uuid"]) 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"], another_env["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 _update(self, **values): self.db_object = db.verification_update(self.uuid, values)
def _update(self, **properties): self._db_entry = db.verification_update(self.uuid, **properties)
def test_verification_update(self): v = self._create_verification() v = db.verification_update(v["uuid"], status="foo", tests_count=10) self.assertEqual("foo", v["status"]) self.assertEqual(10, v["tests_count"])