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/03/07 23:00:49 UTC

git commit: [#5933] Add test to cover unicode display names

Updated Branches:
  refs/heads/tv/5933 0a4fa8cb3 -> f106c14f8


[#5933] Add test to cover unicode display names

Signed-off-by: Tim Van Steenburgh <tv...@gmail.com>


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

Branch: refs/heads/tv/5933
Commit: f106c14f84595c184198a971b7a630dc98337496
Parents: 0a4fa8c
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Thu Mar 7 22:00:29 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Mar 7 22:00:29 2013 +0000

----------------------------------------------------------------------
 Allura/allura/tests/test_globals.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/f106c14f/Allura/allura/tests/test_globals.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/test_globals.py b/Allura/allura/tests/test_globals.py
index eb2a828..493787c 100644
--- a/Allura/allura/tests/test_globals.py
+++ b/Allura/allura/tests/test_globals.py
@@ -1,3 +1,5 @@
+# -*- coding: utf-8 -*-
+
 import re
 import os, allura
 from mock import patch
@@ -148,8 +150,10 @@ def test_macros():
     assert 'test content' in r
 
 def test_macro_project_admins():
+    user = M.User.by_username('test-admin')
+    user.display_name = u'Test Ådmin'
     r = g.markdown_wiki.convert('[[project_admins]]')
-    assert_equal(r, '<div class="markdown_content"><p><a href="/u/test-admin/">Test Admin</a><br /></p>\n</div>')
+    assert_equal(r, u'<div class="markdown_content"><p><a href="/u/test-admin/">Test Ådmin</a><br /></p>\n</div>')
 
 def test_macro_project_admins_one_br():
     p_nbhd = M.Neighborhood.query.get(name='Projects')