feat: expose FSSP source APIs and exports
This commit is contained in:
@@ -36,7 +36,7 @@ def test_discriminated_records_keep_named_ordering_and_old_operations(contract):
|
||||
schemas = contract["components"]["schemas"]
|
||||
for name in ("OrganizationSourceRecord", "OrganizationSourceRecordList"):
|
||||
record = schemas[name]
|
||||
assert len(record["oneOf"]) == 6
|
||||
assert len(record["oneOf"]) == 7
|
||||
assert record["discriminator"]["propertyName"] == "source_group"
|
||||
for group, record_type in (
|
||||
("budget_process_registry", "budget_registry_organization"),
|
||||
@@ -175,3 +175,21 @@ def test_invalid_or_absent_detail_is_typed_error(registry_query, uid, expected):
|
||||
"invalid_uid",
|
||||
"source_record_not_found",
|
||||
}
|
||||
|
||||
|
||||
def test_fssp_variant_preserves_signed_nullable_amounts(contract):
|
||||
schemas = contract["components"]["schemas"]
|
||||
for kind in ("List", "Detail"):
|
||||
name = schemas[
|
||||
"OrganizationSourceRecord"
|
||||
if kind == "Detail"
|
||||
else "OrganizationSourceRecordList"
|
||||
]["discriminator"]["mapping"]["enforcement_proceedings"].rsplit("/", 1)[1]
|
||||
variant = schemas[name]
|
||||
assert variant["properties"]["amount"]["nullable"] is True
|
||||
assert variant["properties"]["amount"]["pattern"] == r"^-?[0-9]+\.[0-9]{2}$"
|
||||
assert variant["properties"]["status"]["enum"] == [
|
||||
"unknown",
|
||||
"ended",
|
||||
"terminated",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user