import pytest
from app.tests.conftest import TENANT_A,TENANT_B,headers
@pytest.mark.asyncio
async def test_tenants_cannot_read_each_other(client):
    row=(await client.post("/api/v1/payment-workspaces",headers=headers(TENANT_A),json={"name":"A"})).json()
    assert (await client.get(f"/api/v1/payment-workspaces/{row['id']}",headers=headers(TENANT_B))).status_code==404
    assert (await client.get("/api/v1/payment-workspaces",headers=headers(TENANT_B))).json()==[]
