Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
tests: Clarify why encoding test uses NamedTemporaryFile.
Alex Vandiverb98d3fc7c4f0
diff --git a/zerver/tests/test_upload.py b/zerver/tests/test_upload.pyindex c976813b7d8..d30f154a216 100644--- a/zerver/tests/test_upload.py+++ b/zerver/tests/test_upload.py@@ -257,6 +257,9 @@ class FileUploadTest(UploadSerializeMixin, ZulipTestCase):consume_response(result)def test_content_type_charset_specified(self) -> None:+ # Setting the charset requires a NamedTemporaryFile, as+ # SimpleUploadedFile does not transmit a charset even if it's+ # provided as part of the content_typewith tempfile.NamedTemporaryFile() as uploaded_file:uploaded_file.write("नाम में क्या रक्खा हे".encode())uploaded_file.seek(0)