fix: resolve parser organizations from directory only
This commit is contained in:
@@ -25,6 +25,7 @@ from django.test import TestCase
|
||||
from organizations.models import Organization
|
||||
|
||||
from tests.apps.parsers.factories import ParserLoadLogFactory
|
||||
from tests.apps.parsers.organization_helpers import create_directory_organization
|
||||
|
||||
|
||||
class NormalizeHelpersTest(TestCase):
|
||||
@@ -67,12 +68,12 @@ class RegistryOrganizationResolverTest(TestCase):
|
||||
self.assertEqual(lookup.by_ogrn, {})
|
||||
|
||||
def test_resolve_organization_id_by_unique_inn_and_ogrn(self):
|
||||
org_by_inn = Organization.objects.create(
|
||||
org_by_inn = create_directory_organization(
|
||||
name="By INN",
|
||||
inn="7701001001",
|
||||
ogrn="1027700100001",
|
||||
)
|
||||
org_by_ogrn = Organization.objects.create(
|
||||
org_by_ogrn = create_directory_organization(
|
||||
name="By OGRN",
|
||||
inn="7701001002",
|
||||
ogrn="1027700100002",
|
||||
@@ -146,12 +147,12 @@ class ParserLoadLogServiceRetryTest(TestCase):
|
||||
|
||||
class SmallParserServiceQueryTest(TestCase):
|
||||
def test_industrial_product_service_query_helpers(self):
|
||||
Organization.objects.create(
|
||||
create_directory_organization(
|
||||
name='ООО "Продукт 1"',
|
||||
inn="7701001001",
|
||||
ogrn="1027700100001",
|
||||
)
|
||||
Organization.objects.create(
|
||||
create_directory_organization(
|
||||
name='ООО "Продукт 2"',
|
||||
inn="7701001001",
|
||||
ogrn="1027700100002",
|
||||
@@ -201,12 +202,12 @@ class SmallParserServiceQueryTest(TestCase):
|
||||
)
|
||||
|
||||
def test_inspection_service_has_data_for_period(self):
|
||||
Organization.objects.create(
|
||||
create_directory_organization(
|
||||
name='ООО "Проверка 1"',
|
||||
inn="7701002001",
|
||||
ogrn="1027700200001",
|
||||
)
|
||||
Organization.objects.create(
|
||||
create_directory_organization(
|
||||
name='ООО "Проверка 2"',
|
||||
inn="7701002002",
|
||||
ogrn="1027700200002",
|
||||
@@ -263,13 +264,13 @@ class SmallParserServiceQueryTest(TestCase):
|
||||
self.assertTrue(InspectionService.has_data_for_period(2026, 4, True))
|
||||
|
||||
def test_procurement_service_find_by_customer_name_with_batch(self):
|
||||
Organization.objects.create(
|
||||
create_directory_organization(
|
||||
name="АО Тестовый заказчик 1",
|
||||
inn="7701003001",
|
||||
kpp="770101001",
|
||||
ogrn="1027700300001",
|
||||
)
|
||||
Organization.objects.create(
|
||||
create_directory_organization(
|
||||
name="АО Тестовый заказчик 2",
|
||||
inn="7701003002",
|
||||
kpp="770101002",
|
||||
@@ -332,7 +333,7 @@ class SmallParserServiceQueryTest(TestCase):
|
||||
|
||||
class FNSReportServiceHelpersTest(TestCase):
|
||||
def test_exists_find_and_status_helpers(self):
|
||||
Organization.objects.create(
|
||||
create_directory_organization(
|
||||
name='ООО "ФНС"',
|
||||
ogrn="1027700111111",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user