mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 03:41:05 -05:00
(Cherry pick v7.2.1)
This commit is contained in:
@@ -134,6 +134,15 @@ class AnymailInboundMessageConstructionTests(SimpleTestCase):
|
||||
att = AnymailInboundMessage.construct_attachment(content_type="image/png", content=content, base64=True)
|
||||
self.assertEqual(att.get_content_bytes(), SAMPLE_IMAGE_CONTENT)
|
||||
|
||||
def test_construct_attachment_unicode_filename(self):
|
||||
# Issue #197
|
||||
att = AnymailInboundMessage.construct_attachment(
|
||||
content_type="text/plain", content="Unicode ✓", charset='utf-8', base64=False,
|
||||
filename="Simulácia.txt", content_id="inline-id",)
|
||||
self.assertEqual(att.get_filename(), "Simulácia.txt")
|
||||
self.assertTrue(att.is_inline_attachment())
|
||||
self.assertEqual(att.get_content_text(), "Unicode ✓")
|
||||
|
||||
def test_parse_raw_mime(self):
|
||||
# (we're not trying to exhaustively test email.parser MIME handling here;
|
||||
# just that AnymailInboundMessage.parse_raw_mime calls it correctly)
|
||||
|
||||
Reference in New Issue
Block a user