From 84579414d04fcbe68843ed3f0f962d7e55dfe525 Mon Sep 17 00:00:00 2001 From: Chris Pastl <chris@crispybits.app> Date: Thu, 1 Jun 2023 20:53:52 +0200 Subject: [PATCH] move back __init__.py, add dummy to discover tests --- src/aura_engine_api/rest/test/__init__.py | 15 +++++++++++++++ tests/__init__.py | 15 --------------- tests/test_internal_controller.py | 2 +- tests/test_public_controller.py | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) create mode 100644 src/aura_engine_api/rest/test/__init__.py diff --git a/src/aura_engine_api/rest/test/__init__.py b/src/aura_engine_api/rest/test/__init__.py new file mode 100644 index 0000000..d6ca842 --- /dev/null +++ b/src/aura_engine_api/rest/test/__init__.py @@ -0,0 +1,15 @@ +import logging + +import connexion +from flask_testing import TestCase + +from aura_engine_api.rest.encoder import JSONEncoder + + +class BaseTestCase(TestCase): + def create_app(self): + logging.getLogger("connexion.operation").setLevel("ERROR") + app = connexion.App(__name__, specification_dir="../swagger/") + app.app.json_encoder = JSONEncoder + app.add_api("swagger.yaml") + return app.app diff --git a/tests/__init__.py b/tests/__init__.py index d6ca842..e69de29 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,15 +0,0 @@ -import logging - -import connexion -from flask_testing import TestCase - -from aura_engine_api.rest.encoder import JSONEncoder - - -class BaseTestCase(TestCase): - def create_app(self): - logging.getLogger("connexion.operation").setLevel("ERROR") - app = connexion.App(__name__, specification_dir="../swagger/") - app.app.json_encoder = JSONEncoder - app.add_api("swagger.yaml") - return app.app diff --git a/tests/test_internal_controller.py b/tests/test_internal_controller.py index a509114..b36b93f 100644 --- a/tests/test_internal_controller.py +++ b/tests/test_internal_controller.py @@ -22,7 +22,7 @@ from __future__ import absolute_import from flask import json from aura_engine_api.rest.models.clock_info import ClockInfo # noqa: E501 -from tests import BaseTestCase +from aura_engine_api.rest.test import BaseTestCase class TestInternalController(BaseTestCase): diff --git a/tests/test_public_controller.py b/tests/test_public_controller.py index 4d22c26..431bb76 100644 --- a/tests/test_public_controller.py +++ b/tests/test_public_controller.py @@ -20,7 +20,7 @@ from __future__ import absolute_import # from aura_engine_api.rest.models.track import Track # noqa: E501 -from tests import BaseTestCase +from aura_engine_api.rest.test import BaseTestCase # from flask import json # from six import BytesIO -- GitLab