Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add coverage for multipart non-ascii messages for #16 #17

Merged
merged 1 commit into from

2 participants

@rpatterson
Owner

The fix for #16 is in repoze/repoze.sendmail#10.

@mcdonc mcdonc merged commit 020a729 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 3, 2012
  1. @rpatterson
This page is out of date. Refresh to see the latest.
Showing with 23 additions and 0 deletions.
  1. +23 −0 pyramid_mailer/tests.py
View
23 pyramid_mailer/tests.py
@@ -419,6 +419,29 @@ def test_send_immediately_and_fail_silently(self):
body="test")
mailer.send_immediately(msg, True)
+
+ def test_send_immediately_multipart(self):
+
+ from repoze.sendmail._compat import b
+
+ from pyramid_mailer.mailer import Mailer
+ from pyramid_mailer.message import Message
+
+ mailer = Mailer()
+
+ utf_8_encoded = b('mo \xe2\x82\xac')
+ utf_8 = utf_8_encoded.decode('utf_8')
+
+ text_string = utf_8
+ html_string = '<p>'+utf_8+'</p>'
+
+ msg = Message(subject="testing",
+ sender="sender@example.com",
+ recipients=["tester@example.com"],
+ body=text_string,
+ html=html_string)
+
+ mailer.send_immediately(msg, True)
def test_send(self):
Something went wrong with that request. Please try again.