fix: implement backend testing amendments and atomic source publication
Some checks failed
Mostovik Backend CI/CD / Tests and lint (push) Successful in 3m16s
Mostovik Backend CI/CD / Deploy dev (push) Has been cancelled
Mostovik Backend CI/CD / Deploy and verify internal main (push) Has been cancelled
Mostovik Backend CI/CD / Build linux/amd64 release images (push) Has been cancelled

This commit is contained in:
Aleksandr Meshchryakov
2026-10-12 09:47:28 +02:00
parent 2eeb237a47
commit 9b3da5b505
46 changed files with 2918 additions and 335 deletions

View File

@@ -193,3 +193,22 @@ def test_fssp_variant_preserves_signed_nullable_amounts(contract):
"ended",
"terminated",
]
def test_testing_amendments_download_and_options_contract(contract):
download = contract["paths"][
"/api/v2/organization-source-records/export-download/"
]["post"]
assert set(download["requestBody"]["content"]) == {
"application/x-www-form-urlencoded"
}
assert set(download["responses"]["200"]["content"]) == {"application/zip"}
invalid = download["responses"]["400"]["content"]["application/json"]["schema"]
schema = contract["components"]["schemas"][invalid["$ref"].rsplit("/", 1)[1]]
assert schema["properties"]["code"]["enum"] == ["invalid_ticket"]
options = contract["paths"]["/api/v2/organization-source-records/filter-options/"][
"get"
]
assert {
param["name"] for param in options["parameters"] if param.get("required")
} == {"source_group", "field"}