You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by je...@apache.org on 2015/02/27 13:50:54 UTC

[21/26] allura git commit: [#7834] Fixed issue that prevented markdown caching.

[#7834] Fixed issue that prevented markdown caching.


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

Branch: refs/heads/ib/7830
Commit: e5e176d42699c9f07e263d2fd1e04f06c8e59239
Parents: 55cd10b
Author: Heith Seewald <hs...@slashdotmedia.com>
Authored: Wed Feb 25 15:15:15 2015 -0500
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Thu Feb 26 08:16:48 2015 +0000

----------------------------------------------------------------------
 Allura/allura/model/types.py        | 1 +
 Allura/allura/tests/test_globals.py | 6 ++++++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/e5e176d4/Allura/allura/model/types.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/types.py b/Allura/allura/model/types.py
index be4b48e..6a8ff71 100644
--- a/Allura/allura/model/types.py
+++ b/Allura/allura/model/types.py
@@ -27,6 +27,7 @@ class MarkdownCache(S.Object):
         super(MarkdownCache, self).__init__(
             fields=dict(
                 md5=S.String(),
+                fix7528=S.Bool,
                 html=S.String(),
                 render_time=S.Float()),
             **kw)

http://git-wip-us.apache.org/repos/asf/allura/blob/e5e176d4/Allura/allura/tests/test_globals.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/test_globals.py b/Allura/allura/tests/test_globals.py
index 53c8af1..6920f6d 100644
--- a/Allura/allura/tests/test_globals.py
+++ b/Allura/allura/tests/test_globals.py
@@ -728,6 +728,12 @@ class TestCachedMarkdown(unittest.TestCase):
         self.assertIsNone(self.post.text_cache.html)
         self.assertIsNone(self.post.text_cache.render_time)
 
+    @patch.dict('allura.lib.app_globals.config', {})
+    def test_all_expected_keys_exist_in_cache(self):
+        self.md.cached_convert(self.post, 'text')
+        required_keys = ['fix7528', 'html', 'md5', 'render_time']
+        keys = sorted(self.post.text_cache.keys())
+        self.assertEqual(required_keys, keys)
 
 
 class TestHandlePaging(unittest.TestCase):