/
githubmirror
/
screenshot-to-code
Обзор
Документация
Войти
/
githubmirror
/
screenshot-to-code
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
backend/tests/test_capabilities.py
31 строка
902 B
Flightdeck Agent
Move capabilities endpoint into dedicated route module
24 июл 2026, 19:02
24 июл 2026, 19:02
fa32989
Код
Авторство
О чём код?
import pytest import preview_screenshot from routes.capabilities import get_capabilities @pytest.mark.asyncio async def test_capabilities_reports_screenshot_preview_available( monkeypatch: pytest.MonkeyPatch, ) -> None: async def fake_probe() -> bool: return True monkeypatch.setattr(preview_screenshot, "probe_screenshot_preview", fake_probe) monkeypatch.setattr("routes.capabilities.probe_screenshot_preview", fake_probe) result = await get_capabilities() assert result.screenshot_preview is True @pytest.mark.asyncio async def test_capabilities_reports_screenshot_preview_unavailable( monkeypatch: pytest.MonkeyPatch, ) -> None: async def fake_probe() -> bool: return False monkeypatch.setattr("routes.capabilities.probe_screenshot_preview", fake_probe) result = await get_capabilities() assert result.screenshot_preview is False