Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Typ5sXWNMFirr2va2uL8o
47 lines
2.0 KiB
Python
47 lines
2.0 KiB
Python
"""Общее для тестов: путь к src, настройки хаба как их отдаёт /agent/settings, конфиг агента под фейковый Jira."""
|
||
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
|
||
|
||
ZERO_PACING = {"ensure_issue": 0, "ensure_fields": 0, "ensure_comment": 0, "ensure_status": 0, "ensure_link": 0,
|
||
"ensure_sprint": 0, "refresh": 0}
|
||
|
||
SETTINGS = {
|
||
"base_jql": "project = AURORA AND labels = AWPCA",
|
||
"project_key": "AURORA",
|
||
"issue_types": {"task": {"name": "Задача", "id": "10100"}, "epic": {"name": "Фича", "id": "12300"}},
|
||
"epic_name_field_id": "customfield_15304",
|
||
"field_ids": {"description": "description", "priority": "priority", "duedate": "duedate", "labels": "labels",
|
||
"planned_start": "customfield_10801", "planned_end": "customfield_10802"},
|
||
"epic_link": {"mode": "field", "field_id": "customfield_15302"},
|
||
"priority_map": {"Наивысший": "Критичный", "Высокий": "Высокий", "Средний": "Средний", "Низкий": "Низкий"},
|
||
"priority_value_key": "name",
|
||
"labels": ["AWPCA"],
|
||
"status_labels": {},
|
||
"kind_labels": {},
|
||
"comment_marker": "Актуализация 10.10.2026",
|
||
"transitions_map": {},
|
||
"link_types": {"блокирует начало": "ASUPR_Блокер_Начала", "связанные": "ASUPR_Связанные"},
|
||
"board_id": 4216,
|
||
"pacing": dict(ZERO_PACING),
|
||
"min_agent_version": 1,
|
||
"settings_version": 1,
|
||
}
|
||
|
||
|
||
def jira_cfg(fake, **over):
|
||
cfg = {"hub_url": "http://127.0.0.1:1", "hub_token": "agent-token",
|
||
"jira": {"base_url": fake.base_url, "auth": {"type": "basic", "user": "me", "password": "secret"}},
|
||
"verify_ssl": True, "ca_bundle": None, "timeout": 5, "poll_seconds": 0}
|
||
cfg.update(over)
|
||
return cfg
|
||
|
||
|
||
def no_sleep(_seconds):
|
||
pass
|