You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2014/06/02 20:35:08 UTC
[3/3] git commit: [#7347] ticket:596 Fix award projects macro test
[#7347] ticket:596 Fix award projects macro test
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/291924f4
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/291924f4
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/291924f4
Branch: refs/heads/master
Commit: 291924f42c9bdc52faab24085fdbc031d6aa60e6
Parents: dc46d87
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri May 30 13:01:54 2014 +0300
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Fri May 30 13:01:54 2014 +0300
----------------------------------------------------------------------
Allura/allura/tests/test_globals.py | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/291924f4/Allura/allura/tests/test_globals.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/test_globals.py b/Allura/allura/tests/test_globals.py
index 912fd66..b546671 100644
--- a/Allura/allura/tests/test_globals.py
+++ b/Allura/allura/tests/test_globals.py
@@ -590,16 +590,20 @@ def test_hideawards_macro():
project = M.Project.query.get(
neighborhood_id=p_nbhd._id, shortname=u'test')
- M.AwardGrant(award=award, granted_by_neighborhood=p_nbhd,
- granted_to_project=project)
+ M.AwardGrant(
+ award=award,
+ award_url='http://award.org',
+ comment='Winner!',
+ granted_by_neighborhood=p_nbhd,
+ granted_to_project=project)
ThreadLocalORMSession.flush_all()
with h.push_context(p_nbhd.neighborhood_project._id):
r = g.markdown_wiki.convert('[[projects]]')
- assert '<div class="feature">Award short</div>' in r, r
+ assert '<div class="feature">\n<a href="http://award.org" title="Winner!" rel="nofollow">Award short</a>\n</div>' in r, r
r = g.markdown_wiki.convert('[[projects show_awards_banner=False]]')
- assert '<div class="feature">Award short</div>' not in r, r
+ assert '<div class="feature">\n<a href="http://award.org" title="Winner!" rel="nofollow">Award short</a>\n</div>' not in r, r
def get_project_names(r):