fix: align source API and exchange demo data
All checks were successful
CI/CD Pipeline / Quality Gate (push) Successful in 30s
CI/CD Pipeline / Build and Push Images (push) Successful in 0s
CI/CD Pipeline / Internal Notify (push) Successful in 1s
CI/CD Pipeline / Deploy Dev via Compose (push) Successful in 0s
CI/CD Pipeline / Quality Gate (pull_request) Successful in 31s
CI/CD Pipeline / Build and Push Images (pull_request) Successful in 1s
CI/CD Pipeline / Internal Notify (pull_request) Successful in 1s
CI/CD Pipeline / Deploy Dev via Compose (pull_request) Successful in 1s

This commit is contained in:
2026-07-22 17:20:39 +02:00
parent 9635cd81d7
commit 4be9e702c3
8 changed files with 411 additions and 40 deletions

View File

@@ -68,7 +68,7 @@ TEST_STATE_CORP_TOKEN = "state-corp-test-exchange-token" # noqa: S105
class StateCorpExchangeServiceTest(TestCase):
"""Verify package compatibility with state-corp receiver contract."""
def test_default_package_excludes_deterministic_test_companies(self):
def test_default_package_includes_deterministic_test_companies(self):
real_organization = Organization.objects.create(
rn=1001,
name="Реальная организация",
@@ -86,10 +86,13 @@ class StateCorpExchangeServiceTest(TestCase):
package = StateCorpExchangeService.build_package()
payload = _decode_package_payload(package)
self.assertEqual(package.payload_counts["organizations"], 1)
self.assertEqual(package.payload_counts["organizations"], 2)
self.assertEqual(
[row["mostovik_uid"] for row in payload["data"]["organizations"]],
[str(real_organization.uid)],
[
str(real_organization.uid),
str(TestCompanyDatasetService.company_uids()[0]),
],
)
def test_build_package_contains_expected_payload(self):