comparison test/test_htmltemplate.py @ 704:54333751e98d search_indexing-0-4-2-branch

Brought search_indexing-branch up to date with latest changes in HEAD.
author Roche Compaan <rochecompaan@users.sourceforge.net>
date Thu, 02 May 2002 13:09:11 +0000
parents d92e06a3a56e
children
comparison
equal deleted inserted replaced
703:8d2cb0d09da4 704:54333751e98d
6 # 6 #
7 # This module is distributed in the hope that it will be useful, 7 # This module is distributed in the hope that it will be useful,
8 # but WITHOUT ANY WARRANTY; without even the implied warranty of 8 # but WITHOUT ANY WARRANTY; without even the implied warranty of
9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 # 10 #
11 # $Id: test_htmltemplate.py,v 1.12 2002-03-29 19:41:48 rochecompaan Exp $ 11 # $Id: test_htmltemplate.py,v 1.12.2.1 2002-05-02 13:09:10 rochecompaan Exp $
12 12
13 import unittest, cgi, time 13 import unittest, cgi, time
14 14
15 from roundup import date, password 15 from roundup import date, password
16 from roundup.htmltemplate import TemplateFunctions 16 from roundup.htmltemplate import TemplateFunctions
232 232
233 def testLink_link(self): 233 def testLink_link(self):
234 self.assertEqual(self.tf.do_link('link'), 234 self.assertEqual(self.tf.do_link('link'),
235 '<a href="other1">the key1</a>') 235 '<a href="other1">the key1</a>')
236 236
237 def testLink_link_id(self):
238 self.assertEqual(self.tf.do_link('link', showid=1),
239 '<a href="other1" title="the key1">1</a>')
240
237 def testLink_multilink(self): 241 def testLink_multilink(self):
238 self.assertEqual(self.tf.do_link('multilink'), 242 self.assertEqual(self.tf.do_link('multilink'),
239 '<a href="other1">the key1</a>, <a href="other2">the key2</a>') 243 '<a href="other1">the key1</a>, <a href="other2">the key2</a>')
244
245 def testLink_multilink_id(self):
246 self.assertEqual(self.tf.do_link('multilink', showid=1),
247 '<a href="other1" title="the key1">1</a>, <a href="other2" title="the key2">2</a>')
240 248
241 # def do_count(self, property, **args): 249 # def do_count(self, property, **args):
242 def testCount_nonlinks(self): 250 def testCount_nonlinks(self):
243 s = _('[Count: not a Multilink]') 251 s = _('[Count: not a Multilink]')
244 self.assertEqual(self.tf.do_count('string'), s) 252 self.assertEqual(self.tf.do_count('string'), s)
342 return unittest.makeSuite(NodeCase, 'test') 350 return unittest.makeSuite(NodeCase, 'test')
343 351
344 352
345 # 353 #
346 # $Log: not supported by cvs2svn $ 354 # $Log: not supported by cvs2svn $
355 # Revision 1.13 2002/04/03 05:54:31 richard
356 # Fixed serialisation problem by moving the serialisation step out of the
357 # hyperdb.Class (get, set) into the hyperdb.Database.
358 #
359 # Also fixed htmltemplate after the showid changes I made yesterday.
360 #
361 # Unit tests for all of the above written.
362 #
363 # Revision 1.12 2002/03/29 19:41:48 rochecompaan
364 # . Fixed display of mutlilink properties when using the template
365 # functions, menu and plain.
366 #
347 # Revision 1.11 2002/02/21 23:11:45 richard 367 # Revision 1.11 2002/02/21 23:11:45 richard
348 # . fixed some problems in date calculations (calendar.py doesn't handle over- 368 # . fixed some problems in date calculations (calendar.py doesn't handle over-
349 # and under-flow). Also, hour/minute/second intervals may now be more than 369 # and under-flow). Also, hour/minute/second intervals may now be more than
350 # 99 each. 370 # 99 each.
351 # 371 #

Roundup Issue Tracker: http://roundup-tracker.org/