1 #
2 # Copyright (c) 2001 Richard Jones
3 # This module is free software, and you may redistribute it and/or modify
4 # under the same terms as Python, so long as this copyright message and
5 # disclaimer are retained in their original form.
6 #
7 # This module is distributed in the hope that it will be useful,
8 # but WITHOUT ANY WARRANTY; without even the implied warranty of
9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 #
11 # $Id: test_htmltemplate.py,v 1.18 2002-07-25 07:14:06 richard Exp $
13 import unittest, cgi, time, os, shutil
15 from roundup import date, password
16 from roundup.htmltemplate import TemplateFunctions, IndexTemplate, ItemTemplate
17 from roundup.i18n import _
18 from roundup.hyperdb import String, Password, Date, Interval, Link, \
19 Multilink, Boolean, Number
21 class TestClass:
22 def get(self, nodeid, attribute, default=None):
23 if attribute == 'string':
24 return 'Node %s: I am a string'%nodeid
25 elif attribute == 'filename':
26 return 'file.foo'
27 elif attribute == 'date':
28 return date.Date('2000-01-01')
29 elif attribute == 'boolean':
30 return 0
31 elif attribute == 'number':
32 return 1234
33 elif attribute == 'reldate':
34 return date.Date() + date.Interval('- 2y 1m')
35 elif attribute == 'interval':
36 return date.Interval('-3d')
37 elif attribute == 'link':
38 return '1'
39 elif attribute == 'multilink':
40 return ['1', '2']
41 elif attribute == 'password':
42 return password.Password('sekrit')
43 elif attribute == 'key':
44 return 'the key'+nodeid
45 elif attribute == 'html':
46 return '<html>hello, I am HTML</html>'
47 elif attribute == 'multiline':
48 return 'hello\nworld'
49 elif attribute == 'email':
50 return 'test@foo.domain.example'
51 def list(self):
52 return ['1', '2']
53 def filter(self, search_matches, filterspec, sort, group):
54 return ['1', '2']
55 def getprops(self):
56 return {'string': String(), 'date': Date(), 'interval': Interval(),
57 'link': Link('other'), 'multilink': Multilink('other'),
58 'password': Password(), 'html': String(), 'key': String(),
59 'novalue': String(), 'filename': String(), 'multiline': String(),
60 'reldate': Date(), 'email': String(), 'boolean': Boolean(),
61 'number': Number()}
62 def labelprop(self, default_to_id=0):
63 return 'key'
65 class TestDatabase:
66 classes = {'other': TestClass()}
67 def getclass(self, name):
68 return Class()
69 def __getattr(self, name):
70 return Class()
72 class FunctionCase(unittest.TestCase):
73 def setUp(self):
74 ''' Set up the harness for calling the individual tests
75 '''
76 self.tf = tf = TemplateFunctions()
77 tf.nodeid = '1'
78 tf.cl = TestClass()
79 tf.classname = 'test_class'
80 tf.properties = tf.cl.getprops()
81 tf.db = TestDatabase()
83 # def do_plain(self, property, escape=0):
84 def testPlain_string(self):
85 s = 'Node 1: I am a string'
86 self.assertEqual(self.tf.do_plain('string'), s)
88 def testPlain_password(self):
89 self.assertEqual(self.tf.do_plain('password'), '*encrypted*')
91 def testPlain_html(self):
92 s = '<html>hello, I am HTML</html>'
93 self.assertEqual(self.tf.do_plain('html', escape=0), s)
94 s = cgi.escape(s)
95 self.assertEqual(self.tf.do_plain('html', escape=1), s)
97 def testPlain_date(self):
98 self.assertEqual(self.tf.do_plain('date'), '2000-01-01.00:00:00')
100 def testPlain_interval(self):
101 self.assertEqual(self.tf.do_plain('interval'), '- 3d')
103 def testPlain_link(self):
104 self.assertEqual(self.tf.do_plain('link'), 'the key1')
106 def testPlain_multilink(self):
107 self.assertEqual(self.tf.do_plain('multilink'), 'the key1, the key2')
109 def testPlain_boolean(self):
110 self.assertEqual(self.tf.do_plain('boolean'), 'No')
112 def testPlain_number(self):
113 self.assertEqual(self.tf.do_plain('number'), '1234')
115 # def do_field(self, property, size=None, showid=0):
116 def testField_string(self):
117 self.assertEqual(self.tf.do_field('string'),
118 '<input name="string" value="Node 1: I am a string" size="30">')
119 self.assertEqual(self.tf.do_field('string', size=10),
120 '<input name="string" value="Node 1: I am a string" size="10">')
122 def testField_password(self):
123 self.assertEqual(self.tf.do_field('password'),
124 '<input type="password" name="password" size="30">')
125 self.assertEqual(self.tf.do_field('password', size=10),
126 '<input type="password" name="password" size="10">')
128 def testField_html(self):
129 self.assertEqual(self.tf.do_field('html'), '<input name="html" '
130 'value="<html>hello, I am HTML</html>" size="30">')
131 self.assertEqual(self.tf.do_field('html', size=10),
132 '<input name="html" value="<html>hello, I am '
133 'HTML</html>" size="10">')
135 def testField_date(self):
136 self.assertEqual(self.tf.do_field('date'),
137 '<input name="date" value="2000-01-01.00:00:00" size="30">')
138 self.assertEqual(self.tf.do_field('date', size=10),
139 '<input name="date" value="2000-01-01.00:00:00" size="10">')
141 def testField_interval(self):
142 self.assertEqual(self.tf.do_field('interval'),
143 '<input name="interval" value="- 3d" size="30">')
144 self.assertEqual(self.tf.do_field('interval', size=10),
145 '<input name="interval" value="- 3d" size="10">')
147 def testField_link(self):
148 self.assertEqual(self.tf.do_field('link'), '''<select name="link">
149 <option value="-1">- no selection -</option>
150 <option selected value="1">the key1</option>
151 <option value="2">the key2</option>
152 </select>''')
154 def testField_multilink(self):
155 self.assertEqual(self.tf.do_field('multilink'),
156 '<input name="multilink" size="30" value="the key1,the key2">')
157 self.assertEqual(self.tf.do_field('multilink', size=10),
158 '<input name="multilink" size="10" value="the key1,the key2">')
160 def testField_boolean(self):
161 self.assertEqual(self.tf.do_field('boolean'),
162 '<input type="checkbox" name="boolean" >')
164 def testField_number(self):
165 self.assertEqual(self.tf.do_field('number'),
166 '<input name="number" value="1234" size="30">')
167 self.assertEqual(self.tf.do_field('number', size=10),
168 '<input name="number" value="1234" size="10">')
170 # def do_multiline(self, property, rows=5, cols=40)
171 def testMultiline_string(self):
172 self.assertEqual(self.tf.do_multiline('multiline'),
173 '<textarea name="multiline" rows="5" cols="40">'
174 'hello\nworld</textarea>')
175 self.assertEqual(self.tf.do_multiline('multiline', rows=10),
176 '<textarea name="multiline" rows="10" cols="40">'
177 'hello\nworld</textarea>')
178 self.assertEqual(self.tf.do_multiline('multiline', cols=10),
179 '<textarea name="multiline" rows="5" cols="10">'
180 'hello\nworld</textarea>')
182 def testMultiline_nonstring(self):
183 s = _('[Multiline: not a string]')
184 self.assertEqual(self.tf.do_multiline('date'), s)
185 self.assertEqual(self.tf.do_multiline('interval'), s)
186 self.assertEqual(self.tf.do_multiline('password'), s)
187 self.assertEqual(self.tf.do_multiline('link'), s)
188 self.assertEqual(self.tf.do_multiline('multilink'), s)
189 self.assertEqual(self.tf.do_multiline('boolean'), s)
190 self.assertEqual(self.tf.do_multiline('number'), s)
192 # def do_menu(self, property, size=None, height=None, showid=0):
193 def testMenu_nonlinks(self):
194 s = _('[Menu: not a link]')
195 self.assertEqual(self.tf.do_menu('string'), s)
196 self.assertEqual(self.tf.do_menu('date'), s)
197 self.assertEqual(self.tf.do_menu('interval'), s)
198 self.assertEqual(self.tf.do_menu('password'), s)
199 self.assertEqual(self.tf.do_menu('boolean'), s)
200 self.assertEqual(self.tf.do_menu('number'), s)
202 def testMenu_link(self):
203 self.assertEqual(self.tf.do_menu('link'), '''<select name="link">
204 <option value="-1">- no selection -</option>
205 <option selected value="1">the key1</option>
206 <option value="2">the key2</option>
207 </select>''')
208 self.assertEqual(self.tf.do_menu('link', size=6),
209 '''<select name="link">
210 <option value="-1">- no selection -</option>
211 <option selected value="1">the...</option>
212 <option value="2">the...</option>
213 </select>''')
214 self.assertEqual(self.tf.do_menu('link', showid=1),
215 '''<select name="link">
216 <option value="-1">- no selection -</option>
217 <option selected value="1">other1: the key1</option>
218 <option value="2">other2: the key2</option>
219 </select>''')
221 def testMenu_multilink(self):
222 self.assertEqual(self.tf.do_menu('multilink', height=10),
223 '''<select multiple name="multilink" size="10">
224 <option selected value="1">the key1</option>
225 <option selected value="2">the key2</option>
226 </select>''')
227 self.assertEqual(self.tf.do_menu('multilink', size=6, height=10),
228 '''<select multiple name="multilink" size="10">
229 <option selected value="1">the...</option>
230 <option selected value="2">the...</option>
231 </select>''')
232 self.assertEqual(self.tf.do_menu('multilink', showid=1),
233 '''<select multiple name="multilink" size="2">
234 <option selected value="1">other1: the key1</option>
235 <option selected value="2">other2: the key2</option>
236 </select>''')
238 # def do_link(self, property=None, is_download=0):
239 def testLink_novalue(self):
240 self.assertEqual(self.tf.do_link('novalue'),
241 _('[no %(propname)s]')%{'propname':'novalue'.capitalize()})
243 def testLink_string(self):
244 self.assertEqual(self.tf.do_link('string'),
245 '<a href="test_class1">Node 1: I am a string</a>')
247 def testLink_file(self):
248 self.assertEqual(self.tf.do_link('filename', is_download=1),
249 '<a href="test_class1/file.foo">file.foo</a>')
251 def testLink_date(self):
252 self.assertEqual(self.tf.do_link('date'),
253 '<a href="test_class1">2000-01-01.00:00:00</a>')
255 def testLink_interval(self):
256 self.assertEqual(self.tf.do_link('interval'),
257 '<a href="test_class1">- 3d</a>')
259 def testLink_link(self):
260 self.assertEqual(self.tf.do_link('link'),
261 '<a href="other1">the key1</a>')
263 def testLink_link_id(self):
264 self.assertEqual(self.tf.do_link('link', showid=1),
265 '<a href="other1" title="the key1">1</a>')
267 def testLink_multilink(self):
268 self.assertEqual(self.tf.do_link('multilink'),
269 '<a href="other1">the key1</a>, <a href="other2">the key2</a>')
271 def testLink_multilink_id(self):
272 self.assertEqual(self.tf.do_link('multilink', showid=1),
273 '<a href="other1" title="the key1">1</a>, <a href="other2" title="the key2">2</a>')
275 def testLink_boolean(self):
276 self.assertEqual(self.tf.do_link('boolean'),
277 '<a href="test_class1">No</a>')
279 def testLink_number(self):
280 self.assertEqual(self.tf.do_link('number'),
281 '<a href="test_class1">1234</a>')
283 # def do_count(self, property, **args):
284 def testCount_nonlinks(self):
285 s = _('[Count: not a Multilink]')
286 self.assertEqual(self.tf.do_count('string'), s)
287 self.assertEqual(self.tf.do_count('date'), s)
288 self.assertEqual(self.tf.do_count('interval'), s)
289 self.assertEqual(self.tf.do_count('password'), s)
290 self.assertEqual(self.tf.do_count('link'), s)
291 self.assertEqual(self.tf.do_count('boolean'), s)
292 self.assertEqual(self.tf.do_count('number'), s)
294 def testCount_multilink(self):
295 self.assertEqual(self.tf.do_count('multilink'), '2')
297 # def do_reldate(self, property, pretty=0):
298 def testReldate_nondate(self):
299 s = _('[Reldate: not a Date]')
300 self.assertEqual(self.tf.do_reldate('string'), s)
301 self.assertEqual(self.tf.do_reldate('interval'), s)
302 self.assertEqual(self.tf.do_reldate('password'), s)
303 self.assertEqual(self.tf.do_reldate('link'), s)
304 self.assertEqual(self.tf.do_reldate('multilink'), s)
305 self.assertEqual(self.tf.do_reldate('boolean'), s)
306 self.assertEqual(self.tf.do_reldate('number'), s)
308 def testReldate_date(self):
309 self.assertEqual(self.tf.do_reldate('reldate'), '- 2y 1m')
310 interval = date.Interval('- 2y 1m')
311 self.assertEqual(self.tf.do_reldate('reldate', pretty=1),
312 interval.pretty())
314 # def do_download(self, property):
315 def testDownload_novalue(self):
316 self.assertEqual(self.tf.do_download('novalue'),
317 _('[no %(propname)s]')%{'propname':'novalue'.capitalize()})
319 def testDownload_string(self):
320 self.assertEqual(self.tf.do_download('string'),
321 '<a href="test_class1/Node 1: I am a string">Node 1: '
322 'I am a string</a>')
324 def testDownload_file(self):
325 self.assertEqual(self.tf.do_download('filename', is_download=1),
326 '<a href="test_class1/file.foo">file.foo</a>')
328 def testDownload_date(self):
329 self.assertEqual(self.tf.do_download('date'),
330 '<a href="test_class1/2000-01-01.00:00:00">2000-01-01.00:00:00</a>')
332 def testDownload_interval(self):
333 self.assertEqual(self.tf.do_download('interval'),
334 '<a href="test_class1/- 3d">- 3d</a>')
336 def testDownload_link(self):
337 self.assertEqual(self.tf.do_download('link'),
338 '<a href="other1/the key1">the key1</a>')
340 def testDownload_multilink(self):
341 self.assertEqual(self.tf.do_download('multilink'),
342 '<a href="other1/the key1">the key1</a>, '
343 '<a href="other2/the key2">the key2</a>')
345 def testDownload_boolean(self):
346 self.assertEqual(self.tf.do_download('boolean'),
347 '<a href="test_class1/No">No</a>')
349 def testDownload_number(self):
350 self.assertEqual(self.tf.do_download('number'),
351 '<a href="test_class1/1234">1234</a>')
353 # def do_checklist(self, property, reverse=0):
354 def testChecklist_nonlinks(self):
355 s = _('[Checklist: not a link]')
356 self.assertEqual(self.tf.do_checklist('string'), s)
357 self.assertEqual(self.tf.do_checklist('date'), s)
358 self.assertEqual(self.tf.do_checklist('interval'), s)
359 self.assertEqual(self.tf.do_checklist('password'), s)
360 self.assertEqual(self.tf.do_checklist('boolean'), s)
361 self.assertEqual(self.tf.do_checklist('number'), s)
363 def testChecklstk_link(self):
364 self.assertEqual(self.tf.do_checklist('link'),
365 '''the key1:<input type="checkbox" checked name="link" value="the key1">
366 the key2:<input type="checkbox" name="link" value="the key2">
367 [unselected]:<input type="checkbox" name="link" value="-1">''')
369 def testChecklink_multilink(self):
370 self.assertEqual(self.tf.do_checklist('multilink'),
371 '''the key1:<input type="checkbox" checked name="multilink" value="the key1">
372 the key2:<input type="checkbox" checked name="multilink" value="the key2">''')
374 # def do_note(self, rows=5, cols=80):
375 def testNote(self):
376 self.assertEqual(self.tf.do_note(), '<textarea name="__note" '
377 'wrap="hard" rows=5 cols=80></textarea>')
379 # def do_list(self, property, reverse=0):
380 def testList_nonlinks(self):
381 s = _('[List: not a Multilink]')
382 self.assertEqual(self.tf.do_list('string'), s)
383 self.assertEqual(self.tf.do_list('date'), s)
384 self.assertEqual(self.tf.do_list('interval'), s)
385 self.assertEqual(self.tf.do_list('password'), s)
386 self.assertEqual(self.tf.do_list('link'), s)
387 self.assertEqual(self.tf.do_list('boolean'), s)
388 self.assertEqual(self.tf.do_list('number'), s)
390 def testList_multilink(self):
391 # TODO: test this (needs to have lots and lots of support!
392 #self.assertEqual(self.tf.do_list('multilink'),'')
393 pass
395 def testClasshelp(self):
396 self.assertEqual(self.tf.do_classhelp('theclass', 'prop1,prop2'),
397 '<a href="javascript:help_window(\'classhelp?classname=theclass'
398 '&properties=prop1,prop2\', \'400\', \'400\')"><b>(?)</b></a>')
400 # def do_email(self, property, rows=5, cols=40)
401 def testEmail_string(self):
402 self.assertEqual(self.tf.do_email('email'), 'test at foo domain example')
404 def testEmail_nonstring(self):
405 s = _('[Email: not a string]')
406 self.assertEqual(self.tf.do_email('date'), s)
407 self.assertEqual(self.tf.do_email('interval'), s)
408 self.assertEqual(self.tf.do_email('password'), s)
409 self.assertEqual(self.tf.do_email('link'), s)
410 self.assertEqual(self.tf.do_email('multilink'), s)
411 self.assertEqual(self.tf.do_email('boolean'), s)
412 self.assertEqual(self.tf.do_email('number'), s)
415 from test_db import setupSchema, MyTestCase, config
417 class Client:
418 user = 'admin'
420 class IndexTemplateCase(unittest.TestCase):
421 def setUp(self):
422 from roundup.backends import anydbm
423 # remove previous test, ignore errors
424 if os.path.exists(config.DATABASE):
425 shutil.rmtree(config.DATABASE)
426 os.makedirs(config.DATABASE + '/files')
427 self.db = anydbm.Database(config, 'test')
428 setupSchema(self.db, 1, anydbm)
430 client = Client()
431 client.db = self.db
432 client.instance = None
433 self.tf = tf = IndexTemplate(client, '', 'issue')
434 tf.props = ['title']
436 # admin user
437 r = str(self.db.role.lookup('Admin'))
438 self.db.user.create(username="admin", roles=[r])
439 r = str(self.db.role.lookup('User'))
440 self.db.user.create(username="anonymous", roles=[r])
442 def testBasic(self):
443 self.assertEqual(self.tf.execute_template('hello'), 'hello')
445 def testValue(self):
446 self.tf.nodeid = self.db.issue.create(title="spam", status='1')
447 self.assertEqual(self.tf.execute_template('<display call="plain(\'title\')">'), 'spam')
449 def testColumnSelection(self):
450 self.tf.nodeid = self.db.issue.create(title="spam", status='1')
451 self.assertEqual(self.tf.execute_template('<property name="title">'
452 '<display call="plain(\'title\')"></property>'
453 '<property name="bar">hello</property>'), 'spam')
454 self.tf.props = ['bar']
455 self.assertEqual(self.tf.execute_template('<property name="title">'
456 '<display call="plain(\'title\')"></property>'
457 '<property name="bar">hello</property>'), 'hello')
459 def testSecurityPass(self):
460 self.assertEqual(self.tf.execute_template(
461 '<require permission="Edit">hello<else>foo</require>'), 'hello')
463 def testSecurityPassValue(self):
464 self.tf.nodeid = self.db.issue.create(title="spam", status='1')
465 self.assertEqual(self.tf.execute_template(
466 '<require permission="Edit">'
467 '<display call="plain(\'title\')">'
468 '<else>not allowed</require>'), 'spam')
470 def testSecurityFail(self):
471 self.tf.client.user = 'anonymous'
472 self.assertEqual(self.tf.execute_template(
473 '<require permission="Edit">hello<else>foo</require>'), 'foo')
475 def testSecurityFailValue(self):
476 self.tf.nodeid = self.db.issue.create(title="spam", status='1')
477 self.tf.client.user = 'anonymous'
478 self.assertEqual(self.tf.execute_template(
479 '<require permission="Edit">allowed<else>'
480 '<display call="plain(\'title\')"></require>'), 'spam')
482 def tearDown(self):
483 if os.path.exists('_test_dir'):
484 shutil.rmtree('_test_dir')
487 class ItemTemplateCase(unittest.TestCase):
488 def setUp(self):
489 ''' Set up the harness for calling the individual tests
490 '''
491 from roundup.backends import anydbm
492 # remove previous test, ignore errors
493 if os.path.exists(config.DATABASE):
494 shutil.rmtree(config.DATABASE)
495 os.makedirs(config.DATABASE + '/files')
496 self.db = anydbm.Database(config, 'test')
497 setupSchema(self.db, 1, anydbm)
499 client = Client()
500 client.db = self.db
501 client.instance = None
502 self.tf = tf = IndexTemplate(client, '', 'issue')
503 tf.nodeid = self.db.issue.create(title="spam", status='1')
505 # admin user
506 r = str(self.db.role.lookup('Admin'))
507 self.db.user.create(username="admin", roles=[r])
508 r = str(self.db.role.lookup('User'))
509 self.db.user.create(username="anonymous", roles=[r])
511 def testBasic(self):
512 self.assertEqual(self.tf.execute_template('hello'), 'hello')
514 def testValue(self):
515 self.assertEqual(self.tf.execute_template('<display call="plain(\'title\')">'), 'spam')
517 def testSecurityPass(self):
518 self.assertEqual(self.tf.execute_template(
519 '<require permission="Edit">hello<else>foo</require>'), 'hello')
521 def testSecurityPassValue(self):
522 self.assertEqual(self.tf.execute_template(
523 '<require permission="Edit">'
524 '<display call="plain(\'title\')">'
525 '<else>not allowed</require>'), 'spam')
527 def testSecurityFail(self):
528 self.tf.client.user = 'anonymous'
529 self.assertEqual(self.tf.execute_template(
530 '<require permission="Edit">hello<else>foo</require>'), 'foo')
532 def testSecurityFailValue(self):
533 self.tf.client.user = 'anonymous'
534 self.assertEqual(self.tf.execute_template(
535 '<require permission="Edit">allowed<else>'
536 '<display call="plain(\'title\')"></require>'), 'spam')
538 def tearDown(self):
539 if os.path.exists('_test_dir'):
540 shutil.rmtree('_test_dir')
542 def suite():
543 return unittest.TestSuite([
544 unittest.makeSuite(FunctionCase, 'test'),
545 unittest.makeSuite(IndexTemplateCase, 'test'),
546 unittest.makeSuite(ItemTemplateCase, 'test'),
547 ])
550 #
551 # $Log: not supported by cvs2svn $
552 # Revision 1.17 2002/07/18 23:07:07 richard
553 # Unit tests and a few fixes.
554 #
555 # Revision 1.16 2002/07/09 05:20:09 richard
556 # . added email display function - mangles email addrs so they're not so easily
557 # scraped from the web
558 #
559 # Revision 1.15 2002/07/08 06:39:00 richard
560 # Fixed unit test support class so the tests ran again.
561 #
562 # Revision 1.14 2002/05/15 06:37:31 richard
563 # ehem and the unit test
564 #
565 # Revision 1.13 2002/04/03 05:54:31 richard
566 # Fixed serialisation problem by moving the serialisation step out of the
567 # hyperdb.Class (get, set) into the hyperdb.Database.
568 #
569 # Also fixed htmltemplate after the showid changes I made yesterday.
570 #
571 # Unit tests for all of the above written.
572 #
573 # Revision 1.12 2002/03/29 19:41:48 rochecompaan
574 # . Fixed display of mutlilink properties when using the template
575 # functions, menu and plain.
576 #
577 # Revision 1.11 2002/02/21 23:11:45 richard
578 # . fixed some problems in date calculations (calendar.py doesn't handle over-
579 # and under-flow). Also, hour/minute/second intervals may now be more than
580 # 99 each.
581 #
582 # Revision 1.10 2002/02/21 06:57:39 richard
583 # . Added popup help for classes using the classhelp html template function.
584 # - add <display call="classhelp('priority', 'id,name,description')">
585 # to an item page, and it generates a link to a popup window which displays
586 # the id, name and description for the priority class. The description
587 # field won't exist in most installations, but it will be added to the
588 # default templates.
589 #
590 # Revision 1.9 2002/02/15 07:08:45 richard
591 # . Alternate email addresses are now available for users. See the MIGRATION
592 # file for info on how to activate the feature.
593 #
594 # Revision 1.8 2002/02/06 03:47:16 richard
595 # . #511586 ] unittest FAIL: testReldate_date
596 #
597 # Revision 1.7 2002/01/23 20:09:41 jhermann
598 # Proper fix for failing test
599 #
600 # Revision 1.6 2002/01/23 05:47:57 richard
601 # more HTML template cleanup and unit tests
602 #
603 # Revision 1.5 2002/01/23 05:10:28 richard
604 # More HTML template cleanup and unit tests.
605 # - download() now implemented correctly, replacing link(is_download=1) [fixed in the
606 # templates, but link(is_download=1) will still work for existing templates]
607 #
608 # Revision 1.4 2002/01/22 22:46:22 richard
609 # more htmltemplate cleanups and unit tests
610 #
611 # Revision 1.3 2002/01/22 06:35:40 richard
612 # more htmltemplate tests and cleanup
613 #
614 # Revision 1.2 2002/01/22 00:12:07 richard
615 # Wrote more unit tests for htmltemplate, and while I was at it, I polished
616 # off the implementation of some of the functions so they behave sanely.
617 #
618 # Revision 1.1 2002/01/21 11:05:48 richard
619 # New tests for htmltemplate (well, it's a beginning)
620 #
621 #
622 #
623 # vim: set filetype=python ts=4 sw=4 et si