Add independent payment-service (port 8012, payment_db) with foundation licensing, BYO-PSP, merchant accounts, idempotent requests, callbacks, and immutable ledger. Co-authored-by: Cursor <cursoragent@cursor.com>
12 lines
663 B
Python
12 lines
663 B
Python
import pytest
|
|
from app.tests.conftest import headers
|
|
@pytest.mark.asyncio
|
|
async def test_foundation_flow(client):
|
|
assert (await client.get("/health")).status_code==200
|
|
w=await client.post("/api/v1/payment-workspaces",headers=headers(),json={"code":"main","name":"Main","status":"enabled","default_payment_mode":"byo_psp"})
|
|
assert w.status_code==201
|
|
b=await client.post("/api/v1/tenant-bundles",headers=headers(),json={"bundle_code":"payment.byo_psp.basic","is_active":True})
|
|
assert b.status_code==201
|
|
caps=(await client.get("/capabilities",headers=headers())).json()
|
|
assert "payment.byo_psp.basic" in caps["active_bundles"]
|