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 2012/11/07 22:00:48 UTC

[3/8] git commit: [#4667] ticket:183 fix ForgeBlog tests related to markdown

[#4667] ticket:183 fix ForgeBlog tests related to markdown


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

Branch: refs/heads/master
Commit: 352a954fe1b294b13c860ccb7ffdaba5804067a3
Parents: 5bb0111
Author: Igor Bondarenko <je...@gmail.com>
Authored: Wed Oct 10 15:59:48 2012 +0300
Committer: Dave Brondsema <db...@geek.net>
Committed: Wed Nov 7 20:30:57 2012 +0000

----------------------------------------------------------------------
 ForgeBlog/forgeblog/tests/test_commands.py       |   11 +++++------
 ForgeBlog/forgeblog/tests/unit/__init__.py       |    2 ++
 ForgeBlog/forgeblog/tests/unit/test_blog_post.py |    4 ++--
 3 files changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/352a954f/ForgeBlog/forgeblog/tests/test_commands.py
----------------------------------------------------------------------
diff --git a/ForgeBlog/forgeblog/tests/test_commands.py b/ForgeBlog/forgeblog/tests/test_commands.py
index 0357c82..f1c9389 100644
--- a/ForgeBlog/forgeblog/tests/test_commands.py
+++ b/ForgeBlog/forgeblog/tests/test_commands.py
@@ -116,8 +116,8 @@ def test_plaintext_preprocessor():
     html = g.markdown.convert(text)
     assert_equal(html,
         '<div class="markdown_content"><p>1. foo '
-        '#foo bar <a href="../baz">baz</a> foo bar '
-        '#foo bar <a href="../baz"> baz </a></p></div>'
+        '#foo bar <a class="" href="../baz">baz</a> foo bar '
+        '#foo bar <a class="" href="../baz"> baz </a></p></div>'
     )
 
 def test_plaintext_preprocessor_wrapped():
@@ -135,8 +135,7 @@ def test_plaintext_preprocessor_wrapped():
     )
     html = g.markdown.convert(text)
     assert_equal(html,
-        '<div class="markdown_content">1. foo\n'
-        '\n'
-        '<p>#foo bar <a href="../baz">baz</a> foo bar </p>\n'
-        '<p>#foo bar <a href="../baz"> baz </a></p></div>'
+        '<div class="markdown_content"><p>1. foo</p>\n'
+        '<p>#foo bar <a class="" href="../baz">baz</a> foo bar </p>\n'
+        '<p>#foo bar <a class="" href="../baz"> baz </a></p></div>'
     )

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/352a954f/ForgeBlog/forgeblog/tests/unit/__init__.py
----------------------------------------------------------------------
diff --git a/ForgeBlog/forgeblog/tests/unit/__init__.py b/ForgeBlog/forgeblog/tests/unit/__init__.py
index e08129c..bcc7cf0 100644
--- a/ForgeBlog/forgeblog/tests/unit/__init__.py
+++ b/ForgeBlog/forgeblog/tests/unit/__init__.py
@@ -1,3 +1,5 @@
+import pylons
+pylons.c = pylons.tmpl_context
 from pylons import c
 from ming.orm.ormsession import ThreadLocalORMSession
 

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/352a954f/ForgeBlog/forgeblog/tests/unit/test_blog_post.py
----------------------------------------------------------------------
diff --git a/ForgeBlog/forgeblog/tests/unit/test_blog_post.py b/ForgeBlog/forgeblog/tests/unit/test_blog_post.py
index c9915c4..542da0e 100644
--- a/ForgeBlog/forgeblog/tests/unit/test_blog_post.py
+++ b/ForgeBlog/forgeblog/tests/unit/test_blog_post.py
@@ -99,6 +99,6 @@ class TestHtmlPreview(BlogTestWithModel):
                     'fugiat nulla pariatur. Excepteur sint occaecat cupidatat '
                     'non proident, sunt in culpa qui officia deserunt mollit '
                     'anim id est laborum.... '
-                    '<a href="/p/test/blog/%s/%02i/untitled/">read more</a>'
-                    '</p></div>') % (now.year, now.month)
+                    '<a class="" href="/p/test/blog/%s/%02i/untitled/">'
+                    'read more</a></p></div>') % (now.year, now.month)
         assert_equal(self._make_post(text).html_text_preview, expected)