11 lines
438 B
Python
11 lines
438 B
Python
from tenant_engine.domain import Tenant
|
|
from tenant_engine.sqlite_store import SQLiteTenantStore
|
|
|
|
|
|
def test_tenant_survives_store_reopen(tmp_path):
|
|
path = str(tmp_path / "tenants.db")
|
|
SQLiteTenantStore(path).create_tenant(
|
|
Tenant.create(tenant_id="tenant:friendly:new", identifier="tenant:friendly:new")
|
|
)
|
|
tenant = SQLiteTenantStore(path).get_tenant("tenant:friendly:new")
|
|
assert tenant.grouping == "friendly"
|