From 7d69a1eae658fae6c7437e0a8316312cb625acb5 Mon Sep 17 00:00:00 2001 From: akhilbatra898 Date: Sat, 18 Mar 2017 14:16:26 +0530 Subject: Add unit tests for List and get in API. - refactor controllers - remove abspath and other irrelvant data in response - move fixtures - refactor decorators JIRA: QTIP-226 Change-Id: I5fac5b1bc998da198098992e7ddb47ba49685f31 Signed-off-by: akhilbatra898 (cherry picked from commit bef693f40ad87170b7233b9fef62f2fd8abfc8d8) --- qtip/api/__main__.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'qtip/api/__main__.py') diff --git a/qtip/api/__main__.py b/qtip/api/__main__.py index 05d92315..381622af 100644 --- a/qtip/api/__main__.py +++ b/qtip/api/__main__.py @@ -14,9 +14,14 @@ import os swagger_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'swagger/')) -def main(): +def get_app(): app = connexion.App(__name__, specification_dir=swagger_dir) - app.add_api('swagger.yaml', base_path='/v1.0') + app.add_api('swagger.yaml', base_path='/v1.0', strict_validation=True) + return app + + +def main(): + app = get_app() app.run(host="0.0.0.0", port=5000) -- cgit 1.2.3-korg