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:
parent
cc0a453476
commit
7a24168080
1 changed files with 2 additions and 0 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue