comparison MoinMoin/macro/_tests/test_ImageLink.py @ 2727:cc9590a900c2

fix tests
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 13 Aug 2007 01:06:37 +0200
parents 388204baf00f
children 104590a28e54
comparison
equal deleted inserted replaced
2726:6cb75379c073 2727:cc9590a900c2
5 @copyright: 2007 MoinMoin:ReimarBauer 5 @copyright: 2007 MoinMoin:ReimarBauer
6 6
7 @license: GNU GPL, see COPYING for details. 7 @license: GNU GPL, see COPYING for details.
8 """ 8 """
9 import os 9 import os
10 from MoinMoin import macro 10 from MoinMoin import macro, wikiutil
11 from MoinMoin.logfile import eventlog 11 from MoinMoin.logfile import eventlog
12 from MoinMoin.Page import Page 12 from MoinMoin.Page import Page
13 from MoinMoin.PageEditor import PageEditor 13 from MoinMoin.PageEditor import PageEditor
14 from MoinMoin.parser.text_moin_wiki import Parser 14 from MoinMoin.parser.text_moin_wiki import Parser
15 15
56 56
57 def testImageLinkNoArg(self): 57 def testImageLinkNoArg(self):
58 """ macro ImageLink test: 'no args for ImageLink (ImageLink is executed on FrontPage) """ 58 """ macro ImageLink test: 'no args for ImageLink (ImageLink is executed on FrontPage) """
59 #self._createTestPage('This is an example to test a macro') 59 #self._createTestPage('This is an example to test a macro')
60 result = self._test_macro('ImageLink', '') 60 result = self._test_macro('ImageLink', '')
61 expected = '<div class="message">Not enough arguments to ImageLink macro! e.g. <<ImageLink(example.png, WikiName, width=200)>>.</div>' 61 expected = '<div class="message">%s</div>' % wikiutil.escape(
62 'Not enough arguments to ImageLink macro! e.g. <<ImageLink(example.png, WikiName, width=200)>>.')
62 assert result == expected 63 assert result == expected
63 64
64 def testImageLinkTwoParamsNoKeyword(self): 65 def testImageLinkTwoParamsNoKeyword(self):
65 """ macro ImageLink test: <<ImageLink(http://static.wikiwikiweb.de/logos/moindude.png, FrontPage)>> """ 66 """ macro ImageLink test: <<ImageLink(http://static.wikiwikiweb.de/logos/moindude.png, FrontPage)>> """
66 self.shouldDeleteTestPage = False 67 self.shouldDeleteTestPage = False