[python-bugzilla] [PATCH 2/2] Add testcase for modify --field option
abn at redhat.com
abn at redhat.com
Tue Jul 8 01:01:11 UTC 2014
From: Arun Babu Neelicattu <abn at redhat.com>
---
tests/modify.py | 14 ++++++++++++++
tests/rw_functional.py | 8 ++++++++
2 files changed, 22 insertions(+)
diff --git a/tests/modify.py b/tests/modify.py
index 1726a62..eefb5d7 100644
--- a/tests/modify.py
+++ b/tests/modify.py
@@ -139,6 +139,20 @@ class ModifyTest(unittest.TestCase):
"url": "http://example.com", "summary": 'foo summary'},
)
+
+ def testField(self):
+ self.clicomm(
+ "--field cf_fixed_in=foo-bar-1.2.4",
+ {"cf_fixed_in": "foo-bar-1.2.4"}
+ )
+
+ self.clicomm(
+ "--field cf_fixed_in=foo-bar-1.2.5 --field=cf_release_notes=blah",
+ {"cf_fixed_in": "foo-bar-1.2.5",
+ "cf_release_notes": "blah"}
+ )
+
+
def testDepends(self):
self.clicomm(
"--dependson 100,200",
diff --git a/tests/rw_functional.py b/tests/rw_functional.py
index 91e4d69..ed55794 100644
--- a/tests/rw_functional.py
+++ b/tests/rw_functional.py
@@ -449,6 +449,14 @@ class RHPartnerTest(BaseTest):
self.assertEquals(bug.platform, "s390")
self.assertEquals(bug.url, "http://example.com/fribby")
+ # modify --field
+ tests.clicomm(cmd + "--field cf_fixed_in=foo-bar-1.2.3 \
+ --field=cf_release_notes=baz", bz)
+
+ bug.refresh()
+ self.assertEquals(bug.fixed_in, "foo-bar-1.2.3")
+ self.assertEquals(bug.cf_release_notes, "baz")
+
def test8Attachments(self):
tmpdir = "__test_attach_output"
--
1.9.3
More information about the python-bugzilla
mailing list