From 7a241680800b6dfa171133bdf92d8131379542c6 Mon Sep 17 00:00:00 2001 From: 0xbyt4 <35742124+0xbyt4@users.noreply.github.com> Date: Sat, 14 Mar 2026 11:13:06 +0300 Subject: [PATCH] fix: add missing choices/Choice to discord mock in test_discord_free_response The mock's app_commands SimpleNamespace lacked choices and Choice attrs, causing xdist test ordering failures when this mock loaded before test_discord_slash_commands. --- tests/gateway/test_discord_free_response.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/gateway/test_discord_free_response.py b/tests/gateway/test_discord_free_response.py index ff15326d..3d41104c 100644 --- a/tests/gateway/test_discord_free_response.py +++ b/tests/gateway/test_discord_free_response.py @@ -29,6 +29,8 @@ def _ensure_discord_mock(): discord_mod.Embed = MagicMock discord_mod.app_commands = SimpleNamespace( describe=lambda **kwargs: (lambda fn: fn), + choices=lambda **kwargs: (lambda fn: fn), + Choice=lambda **kwargs: SimpleNamespace(**kwargs), ) ext_mod = MagicMock()