pyinfra/tests/conftest.py
Julius Unverfehrt be602d8411 Adjust logs
2024-01-23 14:10:56 +01:00

21 lines
489 B
Python

import pytest
from pyinfra.config.loader import load_settings, pyinfra_config_path
from pyinfra.storage.connection import get_storage_from_settings
@pytest.fixture(scope="session")
def settings():
return load_settings(pyinfra_config_path)
@pytest.fixture(scope="class")
def storage(storage_backend, settings):
settings.storage.backend = storage_backend
storage = get_storage_from_settings(settings)
storage.make_bucket()
yield storage
storage.clear_bucket()