summaryrefslogtreecommitdiffstats
path: root/utils/test/testapi/opnfv_testapi/tests/unit
diff options
context:
space:
mode:
Diffstat (limited to 'utils/test/testapi/opnfv_testapi/tests/unit')
-rw-r--r--utils/test/testapi/opnfv_testapi/tests/unit/resources/test_result.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/utils/test/testapi/opnfv_testapi/tests/unit/resources/test_result.py b/utils/test/testapi/opnfv_testapi/tests/unit/resources/test_result.py
index 1df31f36c..6c1a07a91 100644
--- a/utils/test/testapi/opnfv_testapi/tests/unit/resources/test_result.py
+++ b/utils/test/testapi/opnfv_testapi/tests/unit/resources/test_result.py
@@ -62,7 +62,7 @@ class TestResultBase(base.TestBase):
self.version = 'C'
self.build_tag = 'v3.0'
self.scenario = 'odl-l2'
- self.criteria = 'passed'
+ self.criteria = 'PASS'
self.trust_indicator = result_models.TI(0.7)
self.start_date = str(datetime.now())
self.stop_date = str(datetime.now() + timedelta(minutes=1))
@@ -170,6 +170,13 @@ class TestResultCreate(TestResultBase):
req.case_name = None
return req
+ @executor.create(httplib.BAD_REQUEST,
+ message.invalid_value('criteria', ['PASS', 'FAIL']))
+ def test_invalid_criteria(self):
+ req = self.req_d
+ req.criteria = 'invalid'
+ return req
+
@executor.create(httplib.FORBIDDEN, message.not_found_base)
def test_noPod(self):
req = self.req_d