incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [5/6] git commit: [#6694] ticket:461 Fix test
Date Fri, 08 Nov 2013 04:45:50 GMT
[#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/8f0746aa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/8f0746aa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/8f0746aa

Branch: refs/heads/master
Commit: 8f0746aa10d88814fc18a58854c892233e144fca
Parents: 6cd861b
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Mon Nov 4 09:32:26 2013 +0000
Committer: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Committed: Fri Nov 8 04:30:16 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/8f0746aa/Allura/allura/lib/mail_util.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/mail_util.py b/Allura/allura/lib/mail_util.py
index efe7a2d..e6b2b31 100644
--- a/Allura/allura/lib/mail_util.py
+++ b/Allura/allura/lib/mail_util.py
@@ -207,7 +207,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/8f0746aa/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
-
-
-
-
-


Mime
View raw message