예제 #1
0
    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"])
예제 #2
0
    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"])
예제 #3
0
 def _update(self, **values):
     self.db_object = db.verification_update(self.uuid, values)
예제 #4
0
 def _update(self, **properties):
     self._db_entry = db.verification_update(self.uuid, **properties)
예제 #5
0
 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"])
예제 #6
0
 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"])
예제 #7
0
 def _update(self, **values):
     self.db_object = db.verification_update(self.uuid, values)
예제 #8
0
 def _update(self, **properties):
     self._db_entry = db.verification_update(self.uuid, **properties)