X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=tests%2Fconftest.py;h=9d7f136ebfdc92d5ff806a58536b762d28b3e2bf;hb=refs%2Fchanges%2F26%2F7526%2F1;hp=60f3d2e9cbb93f6ecb79ca77fcd12bccfca5bbdc;hpb=84867b76a65efc4e9add52c86eae7e451c4a038d;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