summaryrefslogtreecommitdiffstats
path: root/utils/test/testapi/opnfv_testapi/resources/pod_handlers.py
diff options
context:
space:
mode:
authorSerena Feng <feng.xiaowei@zte.com.cn>2017-04-10 01:08:48 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-04-10 01:08:48 +0000
commit132fecf179dfcbaa7a39eabee0a65762600077d1 (patch)
tree317900e72986127ba7db0f8f2bb73093a785782f /utils/test/testapi/opnfv_testapi/resources/pod_handlers.py
parent6c30e78d5a3fa013b544833167b0822e79d5a53f (diff)
parentaa823fd3bbe42ead475217e2a5b947a636cf63dd (diff)
Merge "unify error message in TestAPI"
Diffstat (limited to 'utils/test/testapi/opnfv_testapi/resources/pod_handlers.py')
-rw-r--r--utils/test/testapi/opnfv_testapi/resources/pod_handlers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/test/testapi/opnfv_testapi/resources/pod_handlers.py b/utils/test/testapi/opnfv_testapi/resources/pod_handlers.py
index fd9ce3eb5..2c303c934 100644
--- a/utils/test/testapi/opnfv_testapi/resources/pod_handlers.py
+++ b/utils/test/testapi/opnfv_testapi/resources/pod_handlers.py
@@ -9,6 +9,7 @@
import httplib
import handlers
+from opnfv_testapi.common import message
from opnfv_testapi.tornado_swagger import swagger
import pod_models
@@ -46,8 +47,7 @@ class PodCLHandler(GenericPodHandler):
return {'name': data.name}
def error(data):
- message = '{} already exists as a pod'.format(data.name)
- return httplib.FORBIDDEN, message
+ return httplib.FORBIDDEN, message.exist('pod', data.name)
miss_checks = ['name']
db_checks = [(self.table, False, query, error)]