feat: use authoritative organization directory
Some checks failed
CI/CD Pipeline / Quality Gate (push) Failing after 9s
CI/CD Pipeline / Build and Push Images (push) Has been skipped
CI/CD Pipeline / Deploy Dev via Compose (push) Has been skipped
CI/CD Pipeline / Internal Notify (push) Successful in 0s

This commit is contained in:
2026-06-07 16:04:43 +02:00
parent 79f0f8ebf7
commit 6ba8fa8d88
41 changed files with 2781 additions and 1058 deletions

View File

@@ -12,7 +12,7 @@ from apps.parsers.clients.zakupki import ZakupkiClient
from apps.parsers.models import ParserLoadLog, ProcurementRecord
from apps.parsers.services import ParserLoadLogService, ProcurementService
from django.test import TestCase, override_settings
from organizations.models import OrganizationSourceRecord
from organizations.models import Organization, OrganizationSourceRecord
from tests.utils import TestHTTPServer
from tests.utils.fixtures import build_zakupki_xml, build_zip, fake
@@ -43,6 +43,14 @@ def _add_zakupki_zip(
count: int = 3,
) -> int:
xml_bytes, rows = build_zakupki_xml(count=count)
for row in rows:
Organization.objects.create(
name=row.customer_name,
inn=row.customer_inn,
kpp=row.customer_kpp,
ogrn=row.customer_ogrn,
okpo=_digits(8),
)
zip_bytes = build_zip([(f"data_{region_code}_{year}_{month}.xml", xml_bytes)])
fz_suffix = f"fz{law_type}"
path = (