surfaces/tests/adapter/matrix/test_reactions.py
Mikhail Putilovskij 974935c880 test(01-06): add failing matrix command-only regressions
- Assert skills text no longer includes reaction-era labels
- Require converter to drop reaction callback support
- Lock !settings dashboard to read-only snapshot copy
2026-04-03 12:32:21 +03:00

32 lines
844 B
Python
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from __future__ import annotations
from adapter.matrix.reactions import (
build_confirmation_text,
build_skills_text,
)
from sdk.interface import UserSettings
def test_build_skills_text():
settings = UserSettings(
skills={"web-search": True, "fetch-url": False},
connectors={},
soul={},
safety={},
plan={},
)
text = build_skills_text(settings)
assert "web-search" in text
assert "fetch-url" in text
assert "!skill on/off" in text
assert "1" not in text
assert "2" not in text
assert "👍" not in text
assert "" not in text
def test_build_confirmation_text():
text = build_confirmation_text("Отправить письмо?")
assert "Отправить письмо?" in text
assert "!yes" in text
assert "!no" in text