diff options
author | Petr Šplíchal <psplicha@redhat.com> | 2012-06-13 11:15:45 +0200 |
---|---|---|
committer | Petr Šplíchal <psplicha@redhat.com> | 2012-06-13 11:15:45 +0200 |
commit | 7fa6bae4683e0dd014254c4be9f88ba2140572de (patch) | |
tree | 0838ae4b4d6b51c7e130efbb65255ce769511c38 | |
parent | d4d092705f4685de2a9396b4cbf647813d2a8f21 (diff) | |
download | python-nitrate-7fa6bae4683e0dd014254c4be9f88ba2140572de.tar.gz python-nitrate-7fa6bae4683e0dd014254c4be9f88ba2140572de.tar.xz python-nitrate-7fa6bae4683e0dd014254c4be9f88ba2140572de.zip |
Fix test run errata update, improve the self test
-rw-r--r-- | source/api.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/source/api.py b/source/api.py index b35778f..b232e8f 100644 --- a/source/api.py +++ b/source/api.py @@ -2700,7 +2700,7 @@ class TestRun(Mutable): hash["estimated_time"] = self.time hash["manager"] = self.manager.id hash["notes"] = self.notes - hash["errata"] = self.errata + hash["errata_id"] = self.errata # This is required until BZ#731982 is fixed hash["product"] = self.build.product.id hash["status"] = self.status.id @@ -2743,11 +2743,14 @@ class TestRun(Mutable): def testErrata(self): """ Set, get and change errata """ - testrun = TestRun(self.testrun.id) - testrun.errata = 12345 - self.assertEqual(testrun.errata, 12345) - testrun.errata = 12233 - self.assertEqual(testrun.errata, 12233) + for errata in [111, 222, 333]: + # Update the errata field, push to the server + testrun = TestRun(self.testrun.id) + testrun.errata = errata + testrun.update() + # Fetch the test run again, check for correct errata + testrun = TestRun(self.testrun.id) + self.assertEqual(testrun.errata, errata) def testDisabledCasesOmitted(self): """ Disabled test cases should be omitted """ |