diff --git a/vmaas/reposcan/conftest.py b/vmaas/reposcan/conftest.py index 8b082b896..533a4ead5 100644 --- a/vmaas/reposcan/conftest.py +++ b/vmaas/reposcan/conftest.py @@ -61,11 +61,13 @@ def write_testing_data(conn): cursor.execute(VMAAS_DB_DATA.read_text(encoding="utf-8")) conn.commit() + @pytest.fixture def client(app): with app.test_client() as client: yield client + @pytest.fixture def client_class(request, client): if request.cls is not None: diff --git a/vmaas/reposcan/test/test_case.py b/vmaas/reposcan/test/test_case.py index 85b2e888f..44b6326e5 100644 --- a/vmaas/reposcan/test/test_case.py +++ b/vmaas/reposcan/test/test_case.py @@ -30,6 +30,7 @@ "x-rh-identity": base64.b64encode(json.dumps(TURNPIKE_IDENTITY).encode("utf-8")) } + @pytest.mark.usefixtures('client_class') class FlaskTestCase: """Base class for vulnerability engine manager test cases"""