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:
@@ -49,6 +49,18 @@ Breaking changes
|
|||||||
`mixin superclass ordering <https://nedbatchelder.com/blog/201210/multiple_inheritance_is_hard.html#comment_13805>`__.)
|
`mixin superclass ordering <https://nedbatchelder.com/blog/201210/multiple_inheritance_is_hard.html#comment_13805>`__.)
|
||||||
|
|
||||||
|
|
||||||
|
v7.2.1
|
||||||
|
------
|
||||||
|
|
||||||
|
*2020-08-05*
|
||||||
|
|
||||||
|
Fixes
|
||||||
|
~~~~~
|
||||||
|
|
||||||
|
* **Inbound:** Fix a Python 2.7-only UnicodeEncodeError when attachments have non-ASCII
|
||||||
|
filenames. (Thanks to `@kika115`_ for reporting it.)
|
||||||
|
|
||||||
|
|
||||||
v7.2 LTS
|
v7.2 LTS
|
||||||
--------
|
--------
|
||||||
|
|
||||||
@@ -1123,6 +1135,7 @@ Features
|
|||||||
.. _@janneThoft: https://github.com/janneThoft
|
.. _@janneThoft: https://github.com/janneThoft
|
||||||
.. _@jc-ee: https://github.com/jc-ee
|
.. _@jc-ee: https://github.com/jc-ee
|
||||||
.. _@joshkersey: https://github.com/joshkersey
|
.. _@joshkersey: https://github.com/joshkersey
|
||||||
|
.. _@kika115: https://github.com/kika115
|
||||||
.. _@Lekensteyn: https://github.com/Lekensteyn
|
.. _@Lekensteyn: https://github.com/Lekensteyn
|
||||||
.. _@lewistaylor: https://github.com/lewistaylor
|
.. _@lewistaylor: https://github.com/lewistaylor
|
||||||
.. _@mbk-ok: https://github.com/mbk-ok
|
.. _@mbk-ok: https://github.com/mbk-ok
|
||||||
|
|||||||
@@ -134,6 +134,15 @@ class AnymailInboundMessageConstructionTests(SimpleTestCase):
|
|||||||
att = AnymailInboundMessage.construct_attachment(content_type="image/png", content=content, base64=True)
|
att = AnymailInboundMessage.construct_attachment(content_type="image/png", content=content, base64=True)
|
||||||
self.assertEqual(att.get_content_bytes(), SAMPLE_IMAGE_CONTENT)
|
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):
|
def test_parse_raw_mime(self):
|
||||||
# (we're not trying to exhaustively test email.parser MIME handling here;
|
# (we're not trying to exhaustively test email.parser MIME handling here;
|
||||||
# just that AnymailInboundMessage.parse_raw_mime calls it correctly)
|
# just that AnymailInboundMessage.parse_raw_mime calls it correctly)
|
||||||
|
|||||||
Reference in New Issue
Block a user