fix(ledger): split dividend response schema and harden decimal tests
Co-authored-by: genichin <4282227+genichin@users.noreply.github.com>
This commit is contained in:
co-authored by
genichin
parent
d3601d32dc
commit
e261a41b7f
@@ -981,9 +981,12 @@ def test_unified_ledger_openapi_contains_nullable_amount() -> None:
|
||||
response = client.get("/openapi.json")
|
||||
assert response.status_code == 200
|
||||
schemas = response.json()["components"]["schemas"]
|
||||
assert "amount" in schemas["LedgerHistoryItem"]["properties"]
|
||||
amount_schema = schemas["ManualLedgerResponse"]["properties"]["amount"]
|
||||
assert any(option.get("type") == "number" for option in amount_schema.get("anyOf", []))
|
||||
manual_amount_types = {option.get("type") for option in schemas["ManualLedgerResponse"]["properties"]["amount"]["anyOf"]}
|
||||
assert manual_amount_types == {"number", "null"}
|
||||
assert schemas["DividendManualLedgerResponse"]["properties"]["amount"]["type"] == "string"
|
||||
history_amount_types = {option.get("type") for option in schemas["LedgerHistoryItem"]["properties"]["amount"]["anyOf"]}
|
||||
assert history_amount_types == {"number", "null"}
|
||||
assert schemas["DividendLedgerHistoryItem"]["properties"]["amount"]["type"] == "string"
|
||||
|
||||
|
||||
def test_reversal_rejects_fee_tax_and_missing_target() -> None:
|
||||
|
||||
Reference in New Issue
Block a user