Add initial implementations for forms and organization apps with serializers, factories, and admin configurations
Some checks failed
CI/CD Pipeline / Run Tests (push) Failing after 45s
CI/CD Pipeline / Code Quality Checks (push) Failing after 48s
CI/CD Pipeline / Build Docker Images (push) Has been skipped
CI/CD Pipeline / Push to Gitea Registry (push) Has been skipped
CI/CD Pipeline / Deploy to Server (push) Has been skipped

This commit is contained in:
2026-03-28 18:23:06 +01:00
parent 8ed3e1175c
commit 345b1d0cc8
201 changed files with 15097 additions and 6691 deletions

View File

@@ -1,5 +1,5 @@
"""Test utilities."""
from .http_server import TestHTTPServer, Response
from .http_server import Response, TestHTTPServer
__all__ = ["TestHTTPServer", "Response"]

View File

@@ -4,8 +4,8 @@ from __future__ import annotations
import io
import zipfile
from collections.abc import Iterable
from dataclasses import dataclass
from typing import Iterable
from faker import Faker
from openpyxl import Workbook
@@ -67,7 +67,9 @@ def _digits(length: int) -> str:
return "".join(str(fake.random_int(0, 9)) for _ in range(length))
def build_minpromtorg_certificates_excel(count: int = 5) -> tuple[bytes, list[CertificateRow]]:
def build_minpromtorg_certificates_excel(
count: int = 5,
) -> tuple[bytes, list[CertificateRow]]:
wb = Workbook()
ws = wb.active
ws.append(
@@ -158,18 +160,18 @@ def build_proverki_xml(count: int = 3) -> tuple[bytes, list[InspectionRow]]:
rows.append(row)
parts.append(
"<INSPECTION "
f"ERPID=\"{row.registration_number}\" "
f"INN=\"{row.inn}\" "
f"OGRN=\"{row.ogrn}\" "
f"ORG_NAME=\"{row.organisation_name}\" "
f"FRGU_ORG_NAME=\"{row.control_authority}\" "
f"ITYPE_NAME=\"{row.inspection_type}\" "
f"ICARRYOUT_TYPE_NAME=\"{row.inspection_form}\" "
f"START_DATE=\"{row.start_date}\" "
f"END_DATE=\"{row.end_date}\" "
f"STATUS=\"{row.status}\" "
f"FZ_NAME=\"{row.legal_basis}\" "
f"RESULT=\"{row.result}\" />"
f'ERPID="{row.registration_number}" '
f'INN="{row.inn}" '
f'OGRN="{row.ogrn}" '
f'ORG_NAME="{row.organisation_name}" '
f'FRGU_ORG_NAME="{row.control_authority}" '
f'ITYPE_NAME="{row.inspection_type}" '
f'ICARRYOUT_TYPE_NAME="{row.inspection_form}" '
f'START_DATE="{row.start_date}" '
f'END_DATE="{row.end_date}" '
f'STATUS="{row.status}" '
f'FZ_NAME="{row.legal_basis}" '
f'RESULT="{row.result}" />'
)
parts.append("</INSPECTIONS>")

View File

@@ -3,12 +3,11 @@
from __future__ import annotations
import json
from collections.abc import Callable
from dataclasses import dataclass, field
from types import SimpleNamespace
from typing import Callable
from urllib.parse import urlparse
import requests
from requests.adapters import BaseAdapter
from requests.models import Response as RequestsResponse
@@ -123,7 +122,7 @@ class TestHTTPServer:
def stop(self) -> None:
self._started = False
def __enter__(self) -> "TestHTTPServer":
def __enter__(self) -> TestHTTPServer:
self.start()
return self