summaryrefslogtreecommitdiffstats
path: root/utils/test/result_collection_api/resources
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-05-31 14:42:08 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-05-31 14:42:08 +0000
commitdd67e264f4b5c01b9b493d215377b15c1a953c4b (patch)
treebcb3ecaa14e1d10d3da908d48b621cbe33b14bf0 /utils/test/result_collection_api/resources
parent9db273c8ee2782b7d9ceb55c7139871ce2513ea0 (diff)
parent94fbad49d3b35bd9c997e1904d265b7b25d81a0f (diff)
Merge "bugfix: query results failed due to wrong using type of trust_indicator"
Diffstat (limited to 'utils/test/result_collection_api/resources')
-rw-r--r--utils/test/result_collection_api/resources/result_handlers.py4
-rw-r--r--utils/test/result_collection_api/resources/result_models.py4
2 files changed, 7 insertions, 1 deletions
diff --git a/utils/test/result_collection_api/resources/result_handlers.py b/utils/test/result_collection_api/resources/result_handlers.py
index e7fce47df..1d52235f6 100644
--- a/utils/test/result_collection_api/resources/result_handlers.py
+++ b/utils/test/result_collection_api/resources/result_handlers.py
@@ -32,6 +32,8 @@ class GenericResultHandler(GenericApiHandler):
period = datetime.now() - timedelta(days=v)
obj = {"$gte": str(period)}
query['creation_date'] = obj
+ elif k == 'trust_indicator':
+ query[k] = float(v)
else:
query[k] = v
return query
@@ -98,7 +100,7 @@ class ResultsCLHandler(GenericResultHandler):
@type period: L{string}
@in period: query
@required period: False
- @param trust_indicator: must be integer
+ @param trust_indicator: must be int/long/float
@type trust_indicator: L{string}
@in trust_indicator: query
@required trust_indicator: False
diff --git a/utils/test/result_collection_api/resources/result_models.py b/utils/test/result_collection_api/resources/result_models.py
index 27c354220..40d21c331 100644
--- a/utils/test/result_collection_api/resources/result_models.py
+++ b/utils/test/result_collection_api/resources/result_models.py
@@ -48,6 +48,10 @@ class ResultCreateRequest(object):
@swagger.model()
class TestResult(object):
+ """
+ @property trust_indicator: must be int/long/float
+ @ptype trust_indicator: L{float}
+ """
def __init__(self, _id=None, case_name=None, project_name=None,
pod_name=None, installer=None, version=None,
start_date=None, stop_date=None, details=None,