summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Šplíchal <psplicha@redhat.com>2012-02-13 13:33:31 +0100
committerPetr Šplíchal <psplicha@redhat.com>2012-02-29 11:27:00 +0100
commit966c78d6906b7b412d125a57321c5080ead037b2 (patch)
tree9f37ee510583229cc0ab44b3b1ae9eb7638f593f
parentd1dd9d26947eb037f8e5608f03bfe6a6a2df9807 (diff)
downloadpython-nitrate-966c78d6906b7b412d125a57321c5080ead037b2.tar.gz
python-nitrate-966c78d6906b7b412d125a57321c5080ead037b2.tar.xz
python-nitrate-966c78d6906b7b412d125a57321c5080ead037b2.zip
More optional values when creating a new test case
-rw-r--r--source/api.py22
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))