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/12 21:04:51 UTC

[4/50] [abbrv] git commit: [#5933] Add test to cover unicode display names

[#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/b6a3df29
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/b6a3df29
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/b6a3df29

Branch: refs/heads/si/5453
Commit: b6a3df29c430bdb85f30237cd57bba50cf8ca735
Parents: 74dbc8e
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Thu Mar 7 22:00:29 2013 +0000
Committer: Dave Brondsema <db...@geek.net>
Committed: Thu Mar 7 22:41:38 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/b6a3df29/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')