1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-24 22:14:18 +00:00

aggiunta creazione repository

This commit is contained in:
stefanogoldoni 2021-05-11 23:53:36 +02:00
parent 8ca659f124
commit b9de4000ba
2 changed files with 11 additions and 1 deletions

View file

@ -4,4 +4,7 @@ Pytest configuration file.
Import global fixtures here. 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

View file

@ -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") @pytest.fixture(scope="package")
def user_access_token(flask_client, user_exists): def user_access_token(flask_client, user_exists):
response = flask_client.post("/api/v1/login", json={ response = flask_client.post("/api/v1/login", json={