comparison test/test_htmltemplate.py @ 814:9a17342a9e04

Fixed unit test support class so the tests ran again.
author Richard Jones <richard@users.sourceforge.net>
date Mon, 08 Jul 2002 06:39:00 +0000
parents 431c3f9c8ac9
children 37ce3f2e05b2
comparison
equal deleted inserted replaced
813:b086b090b9a9 814:9a17342a9e04
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.14 2002-05-15 06:37:31 richard Exp $ 11 # $Id: test_htmltemplate.py,v 1.15 2002-07-08 06:39:00 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
41 return '<html>hello, I am HTML</html>' 41 return '<html>hello, I am HTML</html>'
42 elif attribute == 'multiline': 42 elif attribute == 'multiline':
43 return 'hello\nworld' 43 return 'hello\nworld'
44 def list(self): 44 def list(self):
45 return ['1', '2'] 45 return ['1', '2']
46 def filter(self, search_matches, filterspec, sort, group):
47 return ['1', '2']
46 def getprops(self): 48 def getprops(self):
47 return {'string': String(), 'date': Date(), 'interval': Interval(), 49 return {'string': String(), 'date': Date(), 'interval': Interval(),
48 'link': Link('other'), 'multilink': Multilink('other'), 50 'link': Link('other'), 'multilink': Multilink('other'),
49 'password': Password(), 'html': String(), 'key': String(), 51 'password': Password(), 'html': String(), 'key': String(),
50 'novalue': String(), 'filename': String(), 'multiline': String(), 52 'novalue': String(), 'filename': String(), 'multiline': String(),
51 'reldate': Date()} 53 'reldate': Date()}
52 def labelprop(self): 54 def labelprop(self, default_to_id=0):
53 return 'key' 55 return 'key'
54 56
55 class Database: 57 class Database:
56 classes = {'other': Class()} 58 classes = {'other': Class()}
57 def getclass(self, name): 59 def getclass(self, name):
351 return unittest.makeSuite(NodeCase, 'test') 353 return unittest.makeSuite(NodeCase, 'test')
352 354
353 355
354 # 356 #
355 # $Log: not supported by cvs2svn $ 357 # $Log: not supported by cvs2svn $
358 # Revision 1.14 2002/05/15 06:37:31 richard
359 # ehem and the unit test
360 #
356 # Revision 1.13 2002/04/03 05:54:31 richard 361 # Revision 1.13 2002/04/03 05:54:31 richard
357 # Fixed serialisation problem by moving the serialisation step out of the 362 # Fixed serialisation problem by moving the serialisation step out of the
358 # hyperdb.Class (get, set) into the hyperdb.Database. 363 # hyperdb.Class (get, set) into the hyperdb.Database.
359 # 364 #
360 # Also fixed htmltemplate after the showid changes I made yesterday. 365 # Also fixed htmltemplate after the showid changes I made yesterday.

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