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

This commit is contained in:
2026-05-27 23:13:40 +02:00
parent bd8e1a8400
commit d1b0cd7945
49 changed files with 1831 additions and 319 deletions

View File

@@ -60,10 +60,11 @@ class FormF6ParserTest(TestCase):
self.assertIn("row_code", field_names)
self.assertIn("total_equipment", field_names)
def test_create_record_creates_organization(self):
"""Test create_record creates organization if not exists."""
def test_create_record_uses_existing_organization(self):
"""Report imports must attach rows only to preloaded Mostovik organizations."""
parser = FormF6Parser(report_year=2026, report_quarter=1)
parser.load_batch = 506
organization = OrganizationFactory.create(inn="6234567890")
row_data = {
"inn": "6234567890",
@@ -76,4 +77,4 @@ class FormF6ParserTest(TestCase):
record = parser.create_record(row_data)
self.assertIsNotNone(record)
self.assertEqual(record.organization.inn, "6234567890")
self.assertEqual(record.organization_id, organization.id)