190 build - улучшение работы всего сервиса. часть 1

This commit is contained in:
2026-10-21 13:23:38 +03:00
parent e4bedb1264
commit c6dcfcf533
44 changed files with 5391 additions and 0 deletions

View File

@@ -125,11 +125,33 @@ def test_copy_profile_creates_target_specific_mapping_and_keeps_source(tmp_path:
with database.session() as session:
profiles = list(session.scalars(select(VmixMappingProfile).order_by(VmixMappingProfile.id)))
<<<<<<< HEAD
visible = [profile for profile in profiles if not profile.name.startswith("__AUTO_MAPPING__")]
assert len(visible) == 2
assert visible[0].id == source_id and visible[0].active is True
assert visible[0].project_fingerprint == "a" * 64
assert visible[1].id == result["profile"]["id"] and visible[1].active is True
assert visible[1].project_fingerprint == "b" * 64
# Publishing the copy creates one independent runtime snapshot. The
# source and copied templates remain editable without changing it.
device = session.scalar(select(VmixDevice).where(VmixDevice.device_uuid == "GFX-PORTABLE-02"))
assert device.mapping_source_profile_id == visible[1].id
assert device.mapping_profile_version == visible[1].version
snapshot = session.get(VmixMappingProfile, device.mapping_profile_id)
assert snapshot is not None and snapshot.name.startswith("__AUTO_MAPPING__")
assert snapshot.id not in {profile.id for profile in visible}
assert len(profiles) == 3 and snapshot.project_fingerprint == "b" * 64
published = list(session.scalars(select(VmixMappingField).where(VmixMappingField.profile_id == snapshot.id)))
assert len(published) == 1
assert published[0].vmix_input_title == "SCORE BUG"
assert published[0].vmix_field == "HomeScore.Text"
=======
assert len(profiles) == 2
assert profiles[0].id == source_id and profiles[0].active is True
assert profiles[0].project_fingerprint == "a" * 64
assert profiles[1].active is True
assert profiles[1].project_fingerprint == "b" * 64
>>>>>>> e4bedb1264fca8a6bc8a41f0ca1ff67b176c6651
def test_portable_transfer_backend_remains_available_for_compatibility() -> None: