diff options
author | SerenaFeng <feng.xiaowei@zte.com.cn> | 2017-02-08 10:15:11 +0800 |
---|---|---|
committer | SerenaFeng <feng.xiaowei@zte.com.cn> | 2017-02-09 16:31:00 +0800 |
commit | 4c0d26b4e72b32140d370877700e8a0371d2d30f (patch) | |
tree | 87b6968c238d2299e8aee63baa283f2b19826a2e /utils/test/testapi/opnfv_testapi/resources/handlers.py | |
parent | 9fba1bdb9bff216c3d9a59e0b7ec61e7a2733922 (diff) |
update scenario and related unittest
JIRA: RELENG-163
Change-Id: I137898dc84de5f8cb6cab5de9b4ac5de5e4bb978
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'utils/test/testapi/opnfv_testapi/resources/handlers.py')
-rw-r--r-- | utils/test/testapi/opnfv_testapi/resources/handlers.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/utils/test/testapi/opnfv_testapi/resources/handlers.py b/utils/test/testapi/opnfv_testapi/resources/handlers.py index 5f6c3df57..a2628e249 100644 --- a/utils/test/testapi/opnfv_testapi/resources/handlers.py +++ b/utils/test/testapi/opnfv_testapi/resources/handlers.py @@ -172,8 +172,7 @@ class GenericApiHandler(RequestHandler): .format(new_query, self.table)) # we merge the whole document """ - edit_request = data.format() - edit_request.update(self._update_requests(data)) + edit_request = self._update_requests(data) """ Updating the DB """ yield self._eval_db(self.table, 'update', query, edit_request, @@ -188,7 +187,10 @@ class GenericApiHandler(RequestHandler): data.__getattribute__(k)) if not request: raise HTTPError(HTTP_FORBIDDEN, "Nothing to update") - return request + + edit_request = data.format() + edit_request.update(request) + return edit_request @staticmethod def _update_request(edit_request, key, new_value, old_value): |