X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=tests%2Fconftest.py;fp=tests%2Fconftest.py;h=9d7f136ebfdc92d5ff806a58536b762d28b3e2bf;hb=6bc82510fcc73a6dc2f817caa2ce74b52daa345c;hp=60f3d2e9cbb93f6ecb79ca77fcd12bccfca5bbdc;hpb=7fb3d02a3744ecb368b0531f16175034b987d42f;p=pti%2Fo2.git diff --git a/tests/conftest.py b/tests/conftest.py index 60f3d2e..9d7f136 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -36,12 +36,11 @@ def mock_uow(): def mock_flask_uow(mock_uow): session, uow = mock_uow app = Flask(__name__) - # app.config["TESTING"] = True + app.config["TESTING"] = True api = Api(app) bus = bootstrap(False, uow) configure_namespace(api, bus) - client = app.test_client() - return session, client + return session, app @pytest.fixture @@ -74,11 +73,11 @@ def sqlite_uow(sqlite_session_factory): @pytest.fixture def sqlite_flask_uow(sqlite_uow): app = Flask(__name__) - # app.config["TESTING"] = True + app.config["TESTING"] = True api = Api(app) bus = bootstrap(False, sqlite_uow) configure_namespace(api, bus) - yield app.test_client() + yield sqlite_uow, app @pytest.fixture @@ -134,10 +133,11 @@ def postgres_uow(postgres_session_factory): @pytest.fixture def postgres_flask_uow(postgres_uow): app = Flask(__name__) + app.config["TESTING"] = True api = Api(app) bus = bootstrap(False, postgres_uow) configure_namespace(api, bus) - yield app.test_client() + yield postgres_uow, app @pytest.fixture