summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi/handlers/base_handlers.py
diff options
context:
space:
mode:
authorthuva4 <tharma.thuva@gmail.com>2017-11-16 14:51:29 +0530
committerthuva4 <tharma.thuva@gmail.com>2017-11-16 16:31:55 +0530
commit141e16fcbdcacc02ff30d861bf76082b51d4c287 (patch)
treeaf8f398f254d9e1ba27b392b9e36957a75af77b9 /testapi/opnfv_testapi/handlers/base_handlers.py
parent265e10a036b545d9d4e15bebef17e38e4b013af3 (diff)
Update and Delete functionalities for projects
Implemented the update and delete functions for the projects and wrote the e2e tests for the both functions. Change-Id: I917dd9503f145b0dde61dd9970bd855f9711335e Signed-off-by: thuva4 <tharma.thuva@gmail.com>
Diffstat (limited to 'testapi/opnfv_testapi/handlers/base_handlers.py')
-rw-r--r--testapi/opnfv_testapi/handlers/base_handlers.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/testapi/opnfv_testapi/handlers/base_handlers.py b/testapi/opnfv_testapi/handlers/base_handlers.py
index df7f520..a2fdb19 100644
--- a/testapi/opnfv_testapi/handlers/base_handlers.py
+++ b/testapi/opnfv_testapi/handlers/base_handlers.py
@@ -78,10 +78,10 @@ class GenericApiHandler(web.RequestHandler):
@check.valid_token
@check.no_body
@check.miss_fields
+ @check.new_not_exists
@check.is_authorized
@check.values_check
@check.carriers_exist
- @check.new_not_exists
def _create(self, **kwargs):
"""
:param miss_checks: [miss1, miss2]
@@ -179,6 +179,7 @@ class GenericApiHandler(web.RequestHandler):
@web.asynchronous
@gen.coroutine
@check.not_exist
+ @check.is_authorized
def _delete(self, data, query=None):
yield dbapi.db_delete(self.table, query)
self.finish_request()
@@ -188,6 +189,7 @@ class GenericApiHandler(web.RequestHandler):
@check.no_body
@check.not_exist
@check.updated_one_not_exist
+ @check.is_authorized
def _update(self, data, query=None, **kwargs):
data = self.table_cls.from_dict(data)
update_req = self._update_requests(data)