diff --git a/code/backend/nest_backend/test/conftest.py b/code/backend/nest_backend/test/conftest.py index 8d964cd..fb407cc 100644 --- a/code/backend/nest_backend/test/conftest.py +++ b/code/backend/nest_backend/test/conftest.py @@ -4,4 +4,7 @@ Pytest configuration file. Import global fixtures here. """ -from fixtures.flask_client import flask_client, admin_access_token, admin_headers, user_access_token, user_headers, user_exists +from fixtures.flask_client import flask_client, \ + admin_access_token, admin_headers, \ + user_access_token, user_headers, user_exists, \ + repository_exists diff --git a/code/backend/nest_backend/test/fixtures/flask_client.py b/code/backend/nest_backend/test/fixtures/flask_client.py index 27bfd1e..a760ea3 100644 --- a/code/backend/nest_backend/test/fixtures/flask_client.py +++ b/code/backend/nest_backend/test/fixtures/flask_client.py @@ -64,6 +64,13 @@ def user_exists(admin_headers, flask_client): }) +@pytest.fixture(scope="package") +def repository_exists(admin_headers, flask_client): + flask_client.post(f'/api/v1/repository/', headers=admin_headers, json={ + 'name': 'repo1' + }) + + @pytest.fixture(scope="package") def user_access_token(flask_client, user_exists): response = flask_client.post("/api/v1/login", json={