summaryrefslogtreecommitdiffstats
path: root/Nitrate.py
diff options
context:
space:
mode:
Diffstat (limited to 'Nitrate.py')
-rw-r--r--Nitrate.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/Nitrate.py b/Nitrate.py
index 1325726..c782328 100644
--- a/Nitrate.py
+++ b/Nitrate.py
@@ -289,8 +289,11 @@ class Nitrate(object):
elif isinstance(id, int):
self._id = id
else:
- raise NitrateError("Invalid {0} id: '{1}'".format(
- self.__class__.__name__, id))
+ try:
+ self._id = int(id)
+ except ValueError:
+ raise NitrateError("Invalid {0} id: '{1}'".format(
+ self.__class__.__name__, id))
def __str__(self):
""" Short summary about the connection. """
@@ -1273,7 +1276,7 @@ class TestRun(Mutable):
self._caseruns = [
CaseRun(testcasehash=testcase, caserunhash=caserun)
for caserun in caseruns for testcase in testcases
- if testcase["case_id"] == caserun["case_id"]]
+ if int(testcase["case_id"]) == int(caserun["case_id"])]
return self._caseruns
@property