From 80a93c3534a5c3b3568ffbd118fd02f15fa8eb89 Mon Sep 17 00:00:00 2001 From: Petr Šplíchal Date: Wed, 13 Jun 2012 11:55:25 +0200 Subject: Don't forget to include errata id when creating a new test run --- source/api.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/source/api.py b/source/api.py index b232e8f..6c1dfb3 100644 --- a/source/api.py +++ b/source/api.py @@ -2619,12 +2619,13 @@ class TestRun(Mutable): hash["product"] = product.id hash["product_version"] = product.version.id - # Build + # Build & errata if build is None: build = "unspecified" if isinstance(build, basestring): build = Build(build=build, product=product) hash["build"] = build.id + hash["errata_id"] = errata # Summary & notes if summary is None: @@ -2741,6 +2742,14 @@ class TestRun(Mutable): self.assertTrue(isinstance(testrun, TestRun)) self.assertEqual(testrun.summary, "Test run") + def testCreateOptionalFields(self): + """ Create a new test run, including optional fields """ + testrun = TestRun( + summary="Test run", testplan=self.testplan.id, errata=1234) + self.assertTrue(isinstance(testrun, TestRun)) + self.assertEqual(testrun.summary, "Test run") + self.assertEqual(testrun.errata, 1234) + def testErrata(self): """ Set, get and change errata """ for errata in [111, 222, 333]: -- cgit