21 lines
489 B
Python
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()
|