Rename some variables; Add test case for flask
[pti/o2.git] / tests / conftest.py
index 60f3d2e..9d7f136 100644 (file)
@@ -36,12 +36,11 @@ def mock_uow():
 def mock_flask_uow(mock_uow):\r
     session, uow = mock_uow\r
     app = Flask(__name__)\r
-    app.config["TESTING"] = True\r
+    app.config["TESTING"] = True\r
     api = Api(app)\r
     bus = bootstrap(False, uow)\r
     configure_namespace(api, bus)\r
-    client = app.test_client()\r
-    return session, client\r
+    return session, app\r
 \r
 \r
 @pytest.fixture\r
@@ -74,11 +73,11 @@ def sqlite_uow(sqlite_session_factory):
 @pytest.fixture\r
 def sqlite_flask_uow(sqlite_uow):\r
     app = Flask(__name__)\r
-    app.config["TESTING"] = True\r
+    app.config["TESTING"] = True\r
     api = Api(app)\r
     bus = bootstrap(False, sqlite_uow)\r
     configure_namespace(api, bus)\r
-    yield app.test_client()\r
+    yield sqlite_uow, app\r
 \r
 \r
 @pytest.fixture\r
@@ -134,10 +133,11 @@ def postgres_uow(postgres_session_factory):
 @pytest.fixture\r
 def postgres_flask_uow(postgres_uow):\r
     app = Flask(__name__)\r
+    app.config["TESTING"] = True\r
     api = Api(app)\r
     bus = bootstrap(False, postgres_uow)\r
     configure_namespace(api, bus)\r
-    yield app.test_client()\r
+    yield postgres_uow, app\r
 \r
 \r
 @pytest.fixture\r