fix: resolve parser organizations from directory only
This commit is contained in:
@@ -11,6 +11,7 @@ from django.test import TestCase
|
||||
from organizations.models import Organization, OrganizationSourceRecord
|
||||
|
||||
from tests.apps.parsers.factories import ProcurementRecordFactory, fake
|
||||
from tests.apps.parsers.organization_helpers import create_directory_organization
|
||||
|
||||
|
||||
def _digits(length: int) -> str:
|
||||
@@ -35,7 +36,7 @@ def _other_law(law_type: str) -> str:
|
||||
|
||||
|
||||
def _create_registry_organization(*, inn: str, ogrn: str) -> Organization:
|
||||
return Organization.objects.create(
|
||||
return create_directory_organization(
|
||||
name=fake.company(),
|
||||
ogrn=ogrn,
|
||||
inn=inn,
|
||||
@@ -47,7 +48,7 @@ def _create_registry_organization(*, inn: str, ogrn: str) -> Organization:
|
||||
def _ensure_directory_organization_for_procurement(
|
||||
procurement: Procurement,
|
||||
) -> Organization:
|
||||
return Organization.objects.create(
|
||||
return create_directory_organization(
|
||||
name=procurement.customer_name,
|
||||
ogrn=procurement.customer_ogrn,
|
||||
inn=procurement.customer_inn,
|
||||
|
||||
Reference in New Issue
Block a user