upload: Stop requiring callers pass in the file size.

This can be calculated because we have the contents.
This commit is contained in:
Alex Vandiver
2024-06-20 17:52:55 +00:00
committed by Tim Abbott
parent 58a9fe9af1
commit f52a93bc14
12 changed files with 25 additions and 59 deletions

View File

@@ -601,7 +601,6 @@ class TestEmailMirrorMessagesWithAttachments(ZulipTestCase):
process_message(incoming_valid_message)
upload_message_attachment.assert_called_with(
"image.png",
len(image_bytes),
"image/png",
image_bytes,
get_system_bot(settings.EMAIL_GATEWAY_BOT, stream.realm_id),
@@ -728,7 +727,6 @@ class TestEmailMirrorMessagesWithAttachments(ZulipTestCase):
process_message(incoming_valid_message)
upload_message_attachment.assert_called_with(
utf8_filename,
len(image_bytes),
"image/png",
image_bytes,
get_system_bot(settings.EMAIL_GATEWAY_BOT, stream.realm_id),
@@ -775,7 +773,6 @@ class TestEmailMirrorMessagesWithAttachments(ZulipTestCase):
process_message(incoming_valid_message)
upload_message_attachment.assert_called_with(
"image.png",
len(image_bytes),
"image/png",
image_bytes,
get_system_bot(settings.EMAIL_GATEWAY_BOT, stream.realm_id),