diff 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
line wrap: on
line diff
--- a/tests/test_page.py	Sat Feb 02 20:16:54 2013 -0800
+++ b/tests/test_page.py	Mon Feb 04 21:19:10 2013 -0800
@@ -85,6 +85,13 @@
         second2 = Page(self.wiki, 'sub_dir/second-sibling')
         self.assertEqual(['sub_dir/second'], second2.local_links)
 
+    def testGenericUrl(self):
+        self.wiki = self._getWikiFromStructure({
+            'foo.txt': "URL: [[url:/blah/boo/image.png]]"
+            })
+        foo = Page(self.wiki, 'foo')
+        self.assertEqual("URL: /files/blah/boo/image.png", foo.formatted_text)
+
     def testPageInclude(self):
         self.wiki = self._getWikiFromStructure({
             'Foo.txt': "A test page.\n{{include: trans-desc}}\n",