Mercurial > wikked
comparison tests/test_page.py @ 55:494f3c4660ed
Various changes:
- Debug Flask app is also serving wiki assets (images, etc.) in `/files`.
- Now using Mustache to render pages when there are template parameters.
- Added a more user-friendly error message for circular includes.
- Fixed initialization problems where the wiki would always initially use the
default Flask logger before we got a change to configure it.
- Fixed some problems with queries.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 04 Feb 2013 21:19:10 -0800 |
parents | 9dfbc2a40b71 |
children | 0b4f4c23770a |
comparison
equal
deleted
inserted
replaced
54:9dfbc2a40b71 | 55:494f3c4660ed |
---|---|
82 self.assertEqual(['first', 'sub_dir/second'], first2.local_links) | 82 self.assertEqual(['first', 'sub_dir/second'], first2.local_links) |
83 second = Page(self.wiki, 'sub_dir/second') | 83 second = Page(self.wiki, 'sub_dir/second') |
84 self.assertEqual(['first', 'sub_dir/second-sibling'], second.local_links) | 84 self.assertEqual(['first', 'sub_dir/second-sibling'], second.local_links) |
85 second2 = Page(self.wiki, 'sub_dir/second-sibling') | 85 second2 = Page(self.wiki, 'sub_dir/second-sibling') |
86 self.assertEqual(['sub_dir/second'], second2.local_links) | 86 self.assertEqual(['sub_dir/second'], second2.local_links) |
87 | |
88 def testGenericUrl(self): | |
89 self.wiki = self._getWikiFromStructure({ | |
90 'foo.txt': "URL: [[url:/blah/boo/image.png]]" | |
91 }) | |
92 foo = Page(self.wiki, 'foo') | |
93 self.assertEqual("URL: /files/blah/boo/image.png", foo.formatted_text) | |
87 | 94 |
88 def testPageInclude(self): | 95 def testPageInclude(self): |
89 self.wiki = self._getWikiFromStructure({ | 96 self.wiki = self._getWikiFromStructure({ |
90 'Foo.txt': "A test page.\n{{include: trans-desc}}\n", | 97 'Foo.txt': "A test page.\n{{include: trans-desc}}\n", |
91 'Trans Desc.txt': "BLAH\n" | 98 'Trans Desc.txt': "BLAH\n" |