mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-15 04:12:25 +00:00
test(cron): update _isolate_tick_lock fixture for _get_lock_paths
After PR #13725 replaced the module-level _LOCK_DIR/_LOCK_FILE constants with a dynamic _get_lock_paths() helper, the xdist-isolation fixture needs to patch the function instead of the removed constants.
This commit is contained in:
parent
969bfff449
commit
b014a3d315
3 changed files with 8 additions and 6 deletions
|
|
@ -4090,10 +4090,11 @@ class FeishuAdapter(BasePlatformAdapter):
|
||||||
content=payload,
|
content=payload,
|
||||||
uuid_value=str(uuid.uuid4()),
|
uuid_value=str(uuid.uuid4()),
|
||||||
)
|
)
|
||||||
# Detect whether chat_id is an open_id (private message) or a group chat_id.
|
# Detect whether chat_id is a user open_id (DM) or a chat_id (group).
|
||||||
# Feishu API requires receive_id_type="open_id" for user DMs (oc_/ou_ prefix)
|
# Feishu API expects receive_id_type="open_id" for user DMs (ou_ prefix)
|
||||||
# and receive_id_type="chat_id" for group chats (ch_ prefix).
|
# and receive_id_type="chat_id" for group chats (oc_ prefix, which IS
|
||||||
if chat_id.startswith(("oc_", "ou_")):
|
# the chat_id format — see https://open.feishu.cn/document/).
|
||||||
|
if chat_id.startswith("ou_"):
|
||||||
receive_id_type = "open_id"
|
receive_id_type = "open_id"
|
||||||
else:
|
else:
|
||||||
receive_id_type = "chat_id"
|
receive_id_type = "chat_id"
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,7 @@ AUTHOR_MAP = {
|
||||||
"14046872+tmimmanuel@users.noreply.github.com": "tmimmanuel",
|
"14046872+tmimmanuel@users.noreply.github.com": "tmimmanuel",
|
||||||
"657290301@qq.com": "IMHaoyan",
|
"657290301@qq.com": "IMHaoyan",
|
||||||
"revar@users.noreply.github.com": "revaraver",
|
"revar@users.noreply.github.com": "revaraver",
|
||||||
|
"dengtaoyuan@dengtaoyuandeMac-mini.local": "dengtaoyuan450-a11y",
|
||||||
"beardthelion@users.noreply.github.com": "beardthelion",
|
"beardthelion@users.noreply.github.com": "beardthelion",
|
||||||
"tangyuanjc@JCdeAIfenshendeMac-mini.local": "tangyuanjc",
|
"tangyuanjc@JCdeAIfenshendeMac-mini.local": "tangyuanjc",
|
||||||
"leon@agentlinker.ai": "agentlinker",
|
"leon@agentlinker.ai": "agentlinker",
|
||||||
|
|
|
||||||
|
|
@ -2055,8 +2055,8 @@ class TestParallelTick:
|
||||||
"""Point the tick file lock at a per-test temp dir to avoid xdist contention."""
|
"""Point the tick file lock at a per-test temp dir to avoid xdist contention."""
|
||||||
lock_dir = tmp_path / "cron"
|
lock_dir = tmp_path / "cron"
|
||||||
lock_dir.mkdir()
|
lock_dir.mkdir()
|
||||||
with patch("cron.scheduler._LOCK_DIR", lock_dir), \
|
lock_file = lock_dir / ".tick.lock"
|
||||||
patch("cron.scheduler._LOCK_FILE", lock_dir / ".tick.lock"):
|
with patch("cron.scheduler._get_lock_paths", return_value=(lock_dir, lock_file)):
|
||||||
yield
|
yield
|
||||||
|
|
||||||
def test_parallel_jobs_run_concurrently(self):
|
def test_parallel_jobs_run_concurrently(self):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue