feat: import mostovik exchange sections
All checks were successful
CI/CD Pipeline / Run Tests (push) Successful in 6m12s
CI/CD Pipeline / Code Quality Checks (push) Successful in 6m19s
CI/CD Pipeline / Build Docker Images (push) Successful in 2m21s
CI/CD Pipeline / Push to Gitea Registry (push) Successful in 1s
CI/CD Pipeline / Deploy to Server (push) Successful in 1s
All checks were successful
CI/CD Pipeline / Run Tests (push) Successful in 6m12s
CI/CD Pipeline / Code Quality Checks (push) Successful in 6m19s
CI/CD Pipeline / Build Docker Images (push) Successful in 2m21s
CI/CD Pipeline / Push to Gitea Registry (push) Successful in 1s
CI/CD Pipeline / Deploy to Server (push) Successful in 1s
This commit is contained in:
@@ -12,9 +12,13 @@ from tests.apps.external_data.factories import (
|
||||
ArbitrationCaseFactory,
|
||||
BankruptcyProcedureFactory,
|
||||
DefenseUnreliableSupplierFactory,
|
||||
FinancialReportFactory,
|
||||
FinancialReportLineFactory,
|
||||
IndustrialCertificateFactory,
|
||||
IndustrialProductFactory,
|
||||
InformationSecurityRegistryEntryFactory,
|
||||
LaborVacancyFactory,
|
||||
ManufacturerRegistryEntryFactory,
|
||||
ProsecutorCheckFactory,
|
||||
PublicProcurementFactory,
|
||||
)
|
||||
@@ -48,6 +52,33 @@ class ExternalDataApiTest(APITestCase):
|
||||
response.data["results"][0]["organization"], str(self.organization.id)
|
||||
)
|
||||
|
||||
def test_manufacturing_source_endpoints_are_exposed(self):
|
||||
IndustrialCertificateFactory.create(
|
||||
organization=self.organization,
|
||||
certificate_number="CERT-001",
|
||||
issue_date=date(2026, 1, 10),
|
||||
)
|
||||
ManufacturerRegistryEntryFactory.create(
|
||||
organization=self.organization,
|
||||
full_legal_name="АО Альфа",
|
||||
)
|
||||
IndustrialCertificateFactory.create(organization=self.other_organization)
|
||||
ManufacturerRegistryEntryFactory.create(organization=self.other_organization)
|
||||
|
||||
certificates_response = self.client.get(
|
||||
f"/api/v1/industrial-certificates/?organization={self.organization.id}"
|
||||
"&issue_date_from=2026-01-01&issue_date_to=2026-12-31"
|
||||
)
|
||||
manufacturers_response = self.client.get(
|
||||
f"/api/v1/manufacturers/?organization={self.organization.id}"
|
||||
"&search=Альфа"
|
||||
)
|
||||
|
||||
self.assertEqual(certificates_response.status_code, status.HTTP_200_OK)
|
||||
self.assertEqual(manufacturers_response.status_code, status.HTTP_200_OK)
|
||||
self.assertEqual(certificates_response.data["count"], 1)
|
||||
self.assertEqual(manufacturers_response.data["count"], 1)
|
||||
|
||||
def test_prosecutor_checks_support_date_range_filters(self):
|
||||
ProsecutorCheckFactory.create(
|
||||
organization=self.organization,
|
||||
@@ -163,3 +194,20 @@ class ExternalDataApiTest(APITestCase):
|
||||
vacancies_response.data["results"][0]["title"],
|
||||
"Инженер-испытатель",
|
||||
)
|
||||
|
||||
def test_financial_reports_endpoint_returns_lines(self):
|
||||
report = FinancialReportFactory.create(
|
||||
organization=self.organization,
|
||||
status="success",
|
||||
)
|
||||
FinancialReportLineFactory.create(report=report, line_code="1600")
|
||||
FinancialReportFactory.create(organization=self.other_organization)
|
||||
|
||||
response = self.client.get(
|
||||
f"/api/v1/financial-reports/?organization={self.organization.id}"
|
||||
"&status=success"
|
||||
)
|
||||
|
||||
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
||||
self.assertEqual(response.data["count"], 1)
|
||||
self.assertEqual(response.data["results"][0]["lines"][0]["line_code"], "1600")
|
||||
|
||||
Reference in New Issue
Block a user