X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=utils%2Ftest%2Ftestapi%2Fopnfv_testapi%2Ftests%2Funit%2Ftest_base.py;h=b2be8d593ce333047afe96a52774a03501f15beb;hb=8430ea0f3d49b34a7aaa057be0e780656e94fd27;hp=fc780e44cb8517da52d2d7f33de8bd396549fb68;hpb=04156d074c1d83e86e1c6d7c15dd077b17c86dab;p=releng.git diff --git a/utils/test/testapi/opnfv_testapi/tests/unit/test_base.py b/utils/test/testapi/opnfv_testapi/tests/unit/test_base.py index fc780e44c..b2be8d593 100644 --- a/utils/test/testapi/opnfv_testapi/tests/unit/test_base.py +++ b/utils/test/testapi/opnfv_testapi/tests/unit/test_base.py @@ -8,20 +8,20 @@ ############################################################################## import json -from tornado.web import Application -from tornado.testing import AsyncHTTPTestCase +from tornado import testing +from tornado import web -from opnfv_testapi.router import url_mappings -from opnfv_testapi.resources.models import CreateResponse import fake_pymongo +from opnfv_testapi.resources import models +from opnfv_testapi.router import url_mappings -class TestBase(AsyncHTTPTestCase): +class TestBase(testing.AsyncHTTPTestCase): headers = {'Content-Type': 'application/json; charset=UTF-8'} def setUp(self): self.basePath = '' - self.create_res = CreateResponse + self.create_res = models.CreateResponse self.get_res = None self.list_res = None self.update_res = None @@ -31,10 +31,11 @@ class TestBase(AsyncHTTPTestCase): super(TestBase, self).setUp() def get_app(self): - return Application( + return web.Application( url_mappings.mappings, db=fake_pymongo, debug=True, + auth=False ) def create_d(self, *args):