Mercurial > p > roundup > code
comparison test/test_htmltemplate.py @ 586:50fcb1357967
Proper fix for failing test
| author | Jürgen Hermann <jhermann@users.sourceforge.net> |
|---|---|
| date | Wed, 23 Jan 2002 20:09:41 +0000 |
| parents | 334ae707ebfc |
| children | a4c32558d345 |
comparison
equal
deleted
inserted
replaced
| 585:c08fb4921eda | 586:50fcb1357967 |
|---|---|
| 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.6 2002-01-23 05:47:57 richard Exp $ | 11 # $Id: test_htmltemplate.py,v 1.7 2002-01-23 20:09:41 jhermann Exp $ |
| 12 | 12 |
| 13 import unittest, cgi | 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 |
| 17 from roundup.i18n import _ | 17 from roundup.i18n import _ |
| 18 from roundup.hyperdb import String, Password, Date, Interval, Link, Multilink | 18 from roundup.hyperdb import String, Password, Date, Interval, Link, Multilink |
| 235 self.assertEqual(self.tf.do_reldate('multilink'), s) | 235 self.assertEqual(self.tf.do_reldate('multilink'), s) |
| 236 | 236 |
| 237 def testReldate_date(self): | 237 def testReldate_date(self): |
| 238 self.assertEqual(self.tf.do_reldate('date'), '- 2y 1m') | 238 self.assertEqual(self.tf.do_reldate('date'), '- 2y 1m') |
| 239 self.assertEqual(self.tf.do_reldate('date', pretty=1), | 239 self.assertEqual(self.tf.do_reldate('date', pretty=1), |
| 240 ' 1 January 2000') | 240 ' 1 %s 2000' % time.strftime('%B', time.localtime(0))) |
| 241 | 241 |
| 242 # def do_download(self, property): | 242 # def do_download(self, property): |
| 243 def testDownload_novalue(self): | 243 def testDownload_novalue(self): |
| 244 self.assertEqual(self.tf.do_download('novalue'), | 244 self.assertEqual(self.tf.do_download('novalue'), |
| 245 _('[no %(propname)s]')%{'propname':'novalue'.capitalize()}) | 245 _('[no %(propname)s]')%{'propname':'novalue'.capitalize()}) |
| 312 return unittest.makeSuite(NodeCase, 'test') | 312 return unittest.makeSuite(NodeCase, 'test') |
| 313 | 313 |
| 314 | 314 |
| 315 # | 315 # |
| 316 # $Log: not supported by cvs2svn $ | 316 # $Log: not supported by cvs2svn $ |
| 317 # Revision 1.6 2002/01/23 05:47:57 richard | |
| 318 # more HTML template cleanup and unit tests | |
| 319 # | |
| 317 # Revision 1.5 2002/01/23 05:10:28 richard | 320 # Revision 1.5 2002/01/23 05:10:28 richard |
| 318 # More HTML template cleanup and unit tests. | 321 # More HTML template cleanup and unit tests. |
| 319 # - download() now implemented correctly, replacing link(is_download=1) [fixed in the | 322 # - download() now implemented correctly, replacing link(is_download=1) [fixed in the |
| 320 # templates, but link(is_download=1) will still work for existing templates] | 323 # templates, but link(is_download=1) will still work for existing templates] |
| 321 # | 324 # |
