Пример #1
0
    def finish_verification(self, total, test_cases):
        # update verification db object
        self._update(status=consts.TaskStatus.FINISHED, **total)

        # create db object for results
        data = total.copy()
        data["test_cases"] = test_cases
        db.verification_result_create(self.uuid, data)
Пример #2
0
    def finish_verification(self, total, test_cases):
        # update verification db object
        self._update(status=consts.TaskStatus.FINISHED,
                     tests=total["tests"],
                     # Expected failures are still failures, so we should
                     # merge them together in main info of Verification
                     # (see db model for Verification for more details)
                     failures=(total["failures"] + total["expected_failures"]),
                     time=total["time"])

        # create db object for results
        data = total.copy()
        data["test_cases"] = test_cases
        db.verification_result_create(self.uuid, data)
Пример #3
0
    def test_verification_result_create_and_get(self):
        verification = self._create_verification()
        db_verification = db.verification_get(verification["uuid"])

        ver_result1 = db.verification_result_create(
            db_verification["uuid"], {})
        ver_result2 = db.verification_result_get(db_verification["uuid"])
        self.assertEqual(ver_result1["verification_uuid"],
                         ver_result2["verification_uuid"])
Пример #4
0
    def test_verification_result_create_and_get(self):
        verification = self._create_verification()
        db_verification = db.verification_get(verification["uuid"])

        ver_result1 = db.verification_result_create(db_verification["uuid"],
                                                    {})
        ver_result2 = db.verification_result_get(db_verification["uuid"])
        self.assertEqual(ver_result1["verification_uuid"],
                         ver_result2["verification_uuid"])