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.
This commit is contained in:
0xbyt4 2026-03-14 11:13:06 +03:00
parent cc0a453476
commit 7a24168080

View file

@ -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()