Commit ef0434a1 authored by Chris McDonough's avatar Chris McDonough

Added simple string test.

parent 2e8683c1
...@@ -85,8 +85,8 @@ ...@@ -85,8 +85,8 @@
"""Document Template Tests """Document Template Tests
""" """
__rcs_id__='$Id: testDTML.py,v 1.2 2001/04/27 20:27:40 shane Exp $' __rcs_id__='$Id: testDTML.py,v 1.3 2001/04/28 07:05:44 chrism Exp $'
__version__='$Revision: 1.2 $'[11:-2] __version__='$Revision: 1.3 $'[11:-2]
import sys, os import sys, os
import unittest import unittest
...@@ -274,6 +274,12 @@ class DTMLTests (unittest.TestCase): ...@@ -274,6 +274,12 @@ class DTMLTests (unittest.TestCase):
expected = 'Christmas day is 1995/12/25' expected = 'Christmas day is 1995/12/25'
assert res == expected, res assert res == expected, res
def checkSimpleString(self):
dt = String('%(name)s')
res = dt(name='Chris')
expected = 'Chris'
assert res == expected, res
def checkStringDateFormatting(self): def checkStringDateFormatting(self):
import DateTime import DateTime
html = String("%(name capitalize spacify)s is " html = String("%(name capitalize spacify)s is "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment