diff options
author | Serena Feng <feng.xiaowei@zte.com.cn> | 2017-04-10 01:08:48 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-04-10 01:08:48 +0000 |
commit | 132fecf179dfcbaa7a39eabee0a65762600077d1 (patch) | |
tree | 317900e72986127ba7db0f8f2bb73093a785782f /utils/test/testapi/opnfv_testapi/tests/unit/test_scenario.py | |
parent | 6c30e78d5a3fa013b544833167b0822e79d5a53f (diff) | |
parent | aa823fd3bbe42ead475217e2a5b947a636cf63dd (diff) |
Merge "unify error message in TestAPI"
Diffstat (limited to 'utils/test/testapi/opnfv_testapi/tests/unit/test_scenario.py')
-rw-r--r-- | utils/test/testapi/opnfv_testapi/tests/unit/test_scenario.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/utils/test/testapi/opnfv_testapi/tests/unit/test_scenario.py b/utils/test/testapi/opnfv_testapi/tests/unit/test_scenario.py index ab2c34b31..f2291a566 100644 --- a/utils/test/testapi/opnfv_testapi/tests/unit/test_scenario.py +++ b/utils/test/testapi/opnfv_testapi/tests/unit/test_scenario.py @@ -5,6 +5,7 @@ import httplib import json import os +from opnfv_testapi.common import message import opnfv_testapi.resources.scenario_models as models import test_base as base @@ -66,13 +67,13 @@ class TestScenarioCreate(TestScenarioBase): req_empty = models.ScenarioCreateRequest('') (code, body) = self.create(req_empty) self.assertEqual(code, httplib.BAD_REQUEST) - self.assertIn('name missing', body) + self.assertIn(message.missing('name'), body) def test_noneName(self): req_none = models.ScenarioCreateRequest(None) (code, body) = self.create(req_none) self.assertEqual(code, httplib.BAD_REQUEST) - self.assertIn('name missing', body) + self.assertIn(message.missing('name'), body) def test_success(self): (code, body) = self.create_d() @@ -83,7 +84,7 @@ class TestScenarioCreate(TestScenarioBase): self.create_d() (code, body) = self.create_d() self.assertEqual(code, httplib.FORBIDDEN) - self.assertIn('already exists', body) + self.assertIn(message.exist_base, body) class TestScenarioGet(TestScenarioBase): |