From 08014f8dea875cdfaf4afbaa80fb26073708327a Mon Sep 17 00:00:00 2001 From: SerenaFeng Date: Fri, 14 Jul 2017 19:27:44 +0800 Subject: separate db methods from handler.py db methods are mingled in handler, which is not well structured Change-Id: I639679d3fc05a0b6528158186b8bf89e0cd10596 Signed-off-by: SerenaFeng --- testapi/opnfv_testapi/cmd/server.py | 6 ------ 1 file changed, 6 deletions(-) (limited to 'testapi/opnfv_testapi/cmd/server.py') diff --git a/testapi/opnfv_testapi/cmd/server.py b/testapi/opnfv_testapi/cmd/server.py index e640d5f..a5ac5eb 100644 --- a/testapi/opnfv_testapi/cmd/server.py +++ b/testapi/opnfv_testapi/cmd/server.py @@ -29,7 +29,6 @@ TODOs : """ -import motor import tornado.ioloop from opnfv_testapi.common.config import CONF @@ -37,16 +36,11 @@ from opnfv_testapi.router import url_mappings from opnfv_testapi.tornado_swagger import swagger -def get_db(): - return motor.MotorClient(CONF.mongo_url)[CONF.mongo_dbname] - - def make_app(): swagger.docs(base_url=CONF.swagger_base_url, static_path=CONF.static_path) return swagger.Application( url_mappings.mappings, - db=get_db(), debug=CONF.api_debug, auth=CONF.api_authenticate, cookie_secret='opnfv-testapi', -- cgit 1.2.3-korg