comparison test/test_htmltemplate.py @ 676:bc46480e2a2b

Fixed serialisation problem... ...by moving the serialisation step out of the hyperdb.Class (get, set) into the hyperdb.Database. Also fixed htmltemplate after the showid changes I made yesterday. Unit tests for all of the above written.
author Richard Jones <richard@users.sourceforge.net>
date Wed, 03 Apr 2002 05:54:31 +0000
parents d92e06a3a56e
children 431c3f9c8ac9
comparison
equal deleted inserted replaced
675:e04d291a1194 676:bc46480e2a2b
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.13 2002-04-03 05:54:31 richard 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.12 2002/03/29 19:41:48 rochecompaan
356 # . Fixed display of mutlilink properties when using the template
357 # functions, menu and plain.
358 #
347 # Revision 1.11 2002/02/21 23:11:45 richard 359 # Revision 1.11 2002/02/21 23:11:45 richard
348 # . fixed some problems in date calculations (calendar.py doesn't handle over- 360 # . 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 361 # and under-flow). Also, hour/minute/second intervals may now be more than
350 # 99 each. 362 # 99 each.
351 # 363 #

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