Exemplo n.º 1
0
def manager(tmp_path: Path,
            monkeypatch: MonkeyPatch) -> storage.S3StorageManager:
    monkeypatch.setattr("boto3.client", s3.s3_client)
    return storage.S3StorageManager(bucket="bucket",
                                    access_key="key",
                                    secret_key="secret",
                                    temp_dir=str(tmp_path))
Exemplo n.º 2
0
def test_remote_default_values(monkeypatch: MonkeyPatch) -> None:
    monkeypatch.setattr("boto3.client", s3.s3_client)
    manager = storage.S3StorageManager(bucket="bucket", access_key="key", secret_key="secret")
    assert manager._base_path == tempfile.gettempdir()