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

@@ -1,4 +1,4 @@
"""Contract tests for F-2…F-6 upload endpoints."""
"""Contract tests for F-1…F-6 upload endpoints."""
from __future__ import annotations
@@ -16,7 +16,7 @@ from tests.apps.user.factories import UserFactory
@override_settings(ROOT_URLCONF="core.urls")
class FormUploadContractsApiTest(APITestCase):
"""Contract tests for multipart upload endpoints Ф-2 ... Ф-6."""
"""Contract tests for multipart upload endpoints Ф-1 ... Ф-6."""
BACKGROUND_THRESHOLD_PLUS = 1024 * 1024 + 1
RESULT_PAYLOAD = {
@@ -26,6 +26,16 @@ class FormUploadContractsApiTest(APITestCase):
"errors": [],
}
CASES = {
"f1": {
"url": "/api/v1/forms/f1/upload/",
"form": "f1",
"payload": {"report_year": 2026, "report_month": 9},
"period_field": "report_month",
"period_value": 9,
"report_period_display": "Сентябрь 2026",
"parse_target": "apps.form_1.api.parse_form_f1_file",
"task_target": "apps.form_1.api.process_form_f1_file",
},
"f2": {
"url": "/api/v1/forms/f2/upload/",
"form": "f2",
@@ -109,6 +119,7 @@ class FormUploadContractsApiTest(APITestCase):
if case["period_field"]:
self.assertEqual(response_data[case["period_field"]], case["period_value"])
else:
self.assertNotIn("report_month", response_data)
self.assertNotIn("report_quarter", response_data)
self.assertNotIn("report_half_year", response_data)