eva-agent/tests/_common.py
Andrey Epifancev 67f1a5a096 Каркас eva-agent: общие части jira-agent v14 (#1)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 04:40:33 +04:00

30 lines
939 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""Общее для тестов: путь к src, настройки хаба как их отдаёт /agent/settings, конфиг агента под фейки."""
import os
import sys
SRC = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "src")
if SRC not in sys.path:
sys.path.insert(0, SRC)
import agent # noqa: E402
SETTINGS = {
"wiki_pacing": 0,
"min_agent_version": 1,
"settings_version": 1,
}
EVA_URL = "http://127.0.0.1:1" # заглушка Executor в Eva не ходит; фейк Eva появится вместе с её клиентом
def eva_cfg(eva_url=EVA_URL, **over):
cfg = {"hub_url": "http://127.0.0.1:1", "hub_token": "agent-token",
"eva": {"base_url": eva_url, "token": "eva-secret"},
"verify_ssl": True, "ca_bundle": None, "timeout": 5, "poll_seconds": 0}
cfg.update(over)
return cfg
def no_sleep(_seconds):
pass