X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=utils%2Ftest%2Ftestapi%2Fopnfv_testapi%2Fresources%2Fproject_handlers.py;h=087bb8af2b3e0943d8db08ad10ed90455c451501;hb=b9e0948256af817e63f901ec5277d3ef9fe36fdd;hp=f3521961dfb947faba7dd47f5efcac7a4caf21dd;hpb=35bf4722a3e84c883fa5212be1bfe3424ad9c3b0;p=releng.git diff --git a/utils/test/testapi/opnfv_testapi/resources/project_handlers.py b/utils/test/testapi/opnfv_testapi/resources/project_handlers.py index f3521961d..087bb8af2 100644 --- a/utils/test/testapi/opnfv_testapi/resources/project_handlers.py +++ b/utils/test/testapi/opnfv_testapi/resources/project_handlers.py @@ -6,8 +6,9 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## +import httplib + import handlers -from opnfv_testapi.common import constants from opnfv_testapi.tornado_swagger import swagger import project_models @@ -48,7 +49,7 @@ class ProjectCLHandler(GenericProjectHandler): def error(data): message = '{} already exists as a project'.format(data.name) - return constants.HTTP_FORBIDDEN, message + return httplib.FORBIDDEN, message miss_checks = ['name'] db_checks = [(self.table, False, query, error)]