diff --git a/tests/apps/organizations/test_source_export_snapshot_contract.py b/tests/apps/organizations/test_source_export_snapshot_contract.py index 725c5a5..f971285 100644 --- a/tests/apps/organizations/test_source_export_snapshot_contract.py +++ b/tests/apps/organizations/test_source_export_snapshot_contract.py @@ -220,7 +220,10 @@ def test_sro_export_keeps_all_years_and_identifier_strings(export_client, file_f assert archive.namelist() == [f"sro-membership-check.{file_format}"] content = archive.read(archive.namelist()[0]) if file_format == "json": - rows = json.loads(content) + organizations = json.loads(content) + assert len(organizations) == 1 + assert organizations[0]["okpo"] == "00000001" + rows = organizations[0]["sro_membership"] elif file_format == "csv": rows = list(csv.DictReader(StringIO(content.decode("utf-8-sig")))) else: @@ -231,7 +234,10 @@ def test_sro_export_keeps_all_years_and_identifier_strings(export_client, file_f assert len(rows) == 1 assert rows[0]["ИНН"] == "0012345678" assert rows[0]["ОГРН"] == "0012345678901" - assert rows[0]["ОКПО"] == "00000001" + if file_format == "json": + assert "ОКПО" not in rows[0] + else: + assert rows[0]["ОКПО"] == "00000001" def test_publication_during_render_retries_then_builds_latest_snapshot(export_client):