hobo/tests_passerelle/conftest.py

19 lines
305 B
Python

import json
import os
import shutil
import tempfile
import pytest
@pytest.fixture
def tenant_base(request, settings):
base = tempfile.mkdtemp('passerelle-tenant-base')
settings.TENANT_BASE = base
def fin():
shutil.rmtree(base)
request.addfinalizer(fin)
return tenant_base