Merge "Include tempest_custom in the documentation"
[functest.git] / functest / api / base.py
index efeab82..75f059b 100644 (file)
@@ -17,7 +17,7 @@ import logging
 from flask import request
 from flask_restful import Resource
 
-from functest.api.common import api_utils, error
+from functest.api.common import api_utils
 
 
 LOGGER = logging.getLogger(__name__)
@@ -45,6 +45,11 @@ class ApiResource(Resource):
 
         return action, args
 
+    def _get_args(self):  # pylint: disable=no-self-use
+        """ Convert the unicode to string for request.args """
+        args = api_utils.change_to_str_in_dict(request.args)
+        return args
+
     def _dispatch_post(self):
         """ Dispatch request """
         action, args = self._post_args()
@@ -58,7 +63,7 @@ class ApiResource(Resource):
         try:
             return getattr(self, action)(args)
         except AttributeError:
-            error.result_handler(status=1, data='No such action')
+            api_utils.result_handler(status=1, data='No such action')
 
 
 # Import modules from package "functest.api.resources"