You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by tv...@apache.org on 2013/11/08 05:21:15 UTC

[5/6] git commit: [#6694] ticket:461 Fix test

[#6694] ticket:461 Fix test


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/de17be59
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/de17be59
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/de17be59

Branch: refs/heads/tv/6694
Commit: de17be595de0fd45d2fee1eb4bd44cb9025ab4d9
Parents: e9bb84f
Author: Igor Bondarenko <je...@gmail.com>
Authored: Mon Nov 4 09:32:26 2013 +0000
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Mon Nov 4 09:32:26 2013 +0000

----------------------------------------------------------------------
 Allura/allura/lib/mail_util.py                      | 2 +-
 Allura/allura/tests/functional/test_user_profile.py | 7 ++-----
 2 files changed, 3 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/de17be59/Allura/allura/lib/mail_util.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/mail_util.py b/Allura/allura/lib/mail_util.py
index 70caedc..2e44120 100644
--- a/Allura/allura/lib/mail_util.py
+++ b/Allura/allura/lib/mail_util.py
@@ -187,7 +187,7 @@ class SMTPClient(object):
         # We send one message with multiple envelope recipients, so use a generic To: addr
         # It might be nice to refactor to send one message per recipient, and use the actual To: addr
         if len(addrs) == 1:
-            message['To'] = AddrHeader(addrs[0])
+            message['To'] = AddrHeader(h.really_unicode(addrs[0]))
         else:
             message['To'] = Header(reply_to)
         message['From'] = AddrHeader(fromaddr)

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/de17be59/Allura/allura/tests/functional/test_user_profile.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_user_profile.py b/Allura/allura/tests/functional/test_user_profile.py
index 51b6216..2727a07 100644
--- a/Allura/allura/tests/functional/test_user_profile.py
+++ b/Allura/allura/tests/functional/test_user_profile.py
@@ -68,6 +68,8 @@ class TestUserProfile(TestController):
     def test_send_message(self, check, gen_message_id, sendsimplemail):
         check.return_value = True
         gen_message_id.return_value = 'id'
+        test_user = User.by_username('test-user')
+        test_user.set_pref('email_address', 'test-user@sf.net')
         response = self.app.get('/u/test-user/profile/send_message', status=200)
         assert '<b>From:</b> &#34;Test Admin&#34; &lt;test-admin@users.localhost&gt;' in response
         self.app.post('/u/test-user/profile/send_user_message',
@@ -125,8 +127,3 @@ class TestUserProfile(TestController):
                      status=200)
 
         assert '<a href="send_message">Send me a message</a>' not in r
-
-
-
-
-