feat: import integrated structures from a ZIP archive
Some checks failed
Mostovik Backend CI/CD / Tests and lint (push) Failing after 3m15s
Mostovik Backend CI/CD / Build linux/amd64 release images (push) Has been skipped
Mostovik Backend CI/CD / Deploy dev (push) Has been skipped
Mostovik Backend CI/CD / Deploy and verify internal main (push) Has been skipped

This commit is contained in:
Aleksandr Meshchryakov
2026-10-08 10:34:42 +02:00
parent 70dfc55f3d
commit 4e548fcc8e
8 changed files with 581 additions and 47 deletions

View File

@@ -9,7 +9,10 @@ from openpyxl import load_workbook
from organizations.models import Organization, OrganizationSourceRecord
from rest_framework.test import APIClient
from tests.apps.parsers.test_integrated_structure_workbook import workbook_bytes
from tests.apps.parsers.test_integrated_structure_workbook import (
archive_bytes,
workbook_bytes,
)
from tests.apps.user.factories import UserFactory
@@ -53,8 +56,7 @@ class IntegratedStructurePartialImportTest(TestCase):
return client.post(
"/api/v1/parsers/upload/integrated_structure_documents/",
{
"workbook": SimpleUploadedFile("test.xlsx", raw),
"attachments": list(attachments),
"archive": SimpleUploadedFile("test.zip", archive_bytes(raw, attachments)),
},
format="multipart",
)