feat(registry): add new endpoints for registers, exchange, and backups; update routing and configurations
Some checks failed
CI/CD Pipeline / Code Quality Checks (push) Failing after 3m10s
CI/CD Pipeline / Run Tests (push) Successful in 3m35s
CI/CD Pipeline / Telegram Notify Success (push) Has been skipped
CI/CD Pipeline / Code Quality Checks (pull_request) Failing after 2m26s
CI/CD Pipeline / Run Tests (pull_request) Successful in 2m46s
CI/CD Pipeline / Telegram Notify Success (pull_request) Has been skipped
Some checks failed
CI/CD Pipeline / Code Quality Checks (push) Failing after 3m10s
CI/CD Pipeline / Run Tests (push) Successful in 3m35s
CI/CD Pipeline / Telegram Notify Success (push) Has been skipped
CI/CD Pipeline / Code Quality Checks (pull_request) Failing after 2m26s
CI/CD Pipeline / Run Tests (pull_request) Successful in 2m46s
CI/CD Pipeline / Telegram Notify Success (pull_request) Has been skipped
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
"""Test utilities."""
|
||||
|
||||
from .http_server import TestHTTPServer, Response
|
||||
from .http_server import Response, TestHTTPServer
|
||||
|
||||
__all__ = ["TestHTTPServer", "Response"]
|
||||
|
||||
@@ -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>")
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user