feat: use authoritative organization directory
This commit is contained in:
@@ -32,6 +32,7 @@ from apps.parsers.services import (
|
||||
)
|
||||
from django.test import TestCase
|
||||
from organizations.models import (
|
||||
Organization,
|
||||
OrganizationSourceFinancialLine,
|
||||
OrganizationSourceRecord,
|
||||
)
|
||||
@@ -40,6 +41,25 @@ from organizations.models import (
|
||||
class DirectIngestionParserServicesTest(TestCase):
|
||||
"""Parser save services should not write legacy parser record rows."""
|
||||
|
||||
def setUp(self):
|
||||
for inn, ogrn in (
|
||||
("7707083801", "1027700132001"),
|
||||
("7707083802", "1027700132002"),
|
||||
("7707083803", ""),
|
||||
("7707083804", "1027700132004"),
|
||||
("", "1027700132005"),
|
||||
("", "1027700132006"),
|
||||
("7707083809", "1027700132009"),
|
||||
("7707083810", "1027700132010"),
|
||||
):
|
||||
Organization.objects.create(
|
||||
name=f"Справочник {inn or ogrn}",
|
||||
inn=inn,
|
||||
ogrn=ogrn,
|
||||
kpp="770701001" if inn == "7707083810" else "",
|
||||
okpo="",
|
||||
)
|
||||
|
||||
def test_industrial_certificate_save_records_writes_organization_source_records(self):
|
||||
saved = IndustrialCertificateService.save_certificates(
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user