Systematic rename of all semantic anchors (#region, [DEF], @RELATION) across 1400+ files — backend Python, frontend Svelte/TS, specs, docs: - Flat anchors become Namespace.Module.Entity - @RELATION references updated to match new anchor paths - Zero business logic changes
35 lines
1.5 KiB
Python
35 lines
1.5 KiB
Python
# #region Test.DashboardReleaseModel [C:3] [TYPE Module] [SEMANTICS test,git,release,model]
|
|
# @BRIEF Verify immutable dashboard release ledger fields.
|
|
# @RELATION BINDS_TO -> [Models.DashboardRelease]
|
|
# @TEST_CONTRACT: Valid release input -> immutable repository-scoped release record.
|
|
# @TEST_EDGE: duplicate_version -> database unique constraint owns rejection.
|
|
# @TEST_EDGE: missing_notes -> API schema rejects before persistence.
|
|
# @TEST_EDGE: changed_preprod -> release route marks the active release superseded.
|
|
# @TEST_INVARIANT: SourceHashesImmutable -> VERIFIED_BY: stores_pinned_candidate_hashes.
|
|
|
|
from src.models.dashboard_release import DashboardRelease
|
|
|
|
|
|
class TestDashboardRelease:
|
|
# #region Test.DashboardReleaseModel.TestStoresPinnedCandidateHashes [C:2] [TYPE Function]
|
|
# @BRIEF A release retains the exact commit and semantic content hash selected in PREPROD.
|
|
def test_stores_pinned_candidate_hashes(self):
|
|
release = DashboardRelease(
|
|
repository_id="repo-1",
|
|
deployment_id=17,
|
|
name="July dashboard",
|
|
version="2026.07.16",
|
|
notes="Новый фильтр региона",
|
|
commit_hash="a" * 40,
|
|
content_hash="b" * 64,
|
|
status="awaiting_approval",
|
|
created_by="analyst",
|
|
)
|
|
assert release.commit_hash == "a" * 40
|
|
assert release.content_hash == "b" * 64
|
|
assert release.status == "awaiting_approval"
|
|
# #endregion Test.DashboardReleaseModel.TestStoresPinnedCandidateHashes
|
|
|
|
|
|
# #endregion Test.DashboardReleaseModel
|