mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
test(discord): update send_document/send_video expectations to plural files= kwarg
Sibling tests pinned the old singular file= handle form that #66797 replaced with path-based File via files=[...].
This commit is contained in:
parent
c82f4636f2
commit
45af1118b5
1 changed files with 8 additions and 2 deletions
|
|
@ -242,7 +242,11 @@ class TestDiscordSendImageFile:
|
|||
|
||||
assert result.success
|
||||
assert result.message_id == "100"
|
||||
assert "file" in mock_channel.send.call_args.kwargs
|
||||
# #66797: path-based File sent via plural files=[...] (matches the
|
||||
# image-batch path; the singular file= handle form could race the
|
||||
# multipart encoder and silently drop the attachment).
|
||||
sent_files = mock_channel.send.call_args.kwargs.get("files")
|
||||
assert sent_files and len(sent_files) == 1
|
||||
assert file_cls.call_args.kwargs["filename"] == "renamed.pdf"
|
||||
|
||||
def test_send_video_uploads_file_attachment(self, adapter, tmp_path):
|
||||
|
|
@ -267,7 +271,9 @@ class TestDiscordSendImageFile:
|
|||
|
||||
assert result.success
|
||||
assert result.message_id == "101"
|
||||
assert "file" in mock_channel.send.call_args.kwargs
|
||||
# #66797: path-based File sent via plural files=[...] (see above).
|
||||
sent_files = mock_channel.send.call_args.kwargs.get("files")
|
||||
assert sent_files and len(sent_files) == 1
|
||||
assert file_cls.call_args.kwargs["filename"] == "clip.mp4"
|
||||
|
||||
def test_returns_error_when_file_missing(self, adapter):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue