diff options
author | Petr Šplíchal <psplicha@redhat.com> | 2012-02-13 13:33:31 +0100 |
---|---|---|
committer | Petr Šplíchal <psplicha@redhat.com> | 2012-02-29 11:27:00 +0100 |
commit | 966c78d6906b7b412d125a57321c5080ead037b2 (patch) | |
tree | 9f37ee510583229cc0ab44b3b1ae9eb7638f593f /source/api.py | |
parent | d1dd9d26947eb037f8e5608f03bfe6a6a2df9807 (diff) | |
download | python-nitrate-966c78d6906b7b412d125a57321c5080ead037b2.tar.gz python-nitrate-966c78d6906b7b412d125a57321c5080ead037b2.tar.xz python-nitrate-966c78d6906b7b412d125a57321c5080ead037b2.zip |
More optional values when creating a new test case
Diffstat (limited to 'source/api.py')
-rw-r--r-- | source/api.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/source/api.py b/source/api.py index 3d22d96..f1cad00 100644 --- a/source/api.py +++ b/source/api.py @@ -2587,6 +2587,28 @@ class TestCase(Mutable): # Script hash["script"] = kwargs.get("script") + # Case Status + status = kwargs.get("status") + if status: + if isinstance(status, basestring): + status = CaseStatus(status) + hash["case_status"] = status.id + + # Automated + automated = kwargs.get("automated") + if automated is not None: + hash["is_automated"] = automated + + # Estimated time + time = kwargs.get("time") + if time is not None: + hash["estimated_time"] = time + + # Notes + notes = kwargs.get("notes") + if notes: + hash["notes"] = notes + # Submit log.info("Creating a new test case") log.debug(pretty(hash)) |