feat: use authoritative organization directory
This commit is contained in:
@@ -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 = (
|
||||
|
||||
Reference in New Issue
Block a user