fix test_html and test_template for py3

This commit is contained in:
ilvalle
2016-06-03 11:46:32 +02:00
parent db8306b5c4
commit 97eb013831
12 changed files with 266 additions and 224 deletions
+2 -1
View File
@@ -32,6 +32,7 @@ class TestTemplate(unittest.TestCase):
def testEqualWrite(self):
"test generation of response.write from ="
self.assertEqual(render(content='{{=2+2}}'), '4')
self.assertEqual(render(content='{{="abc"}}'), 'abc')
# whitespace is stripped
self.assertEqual(render(content='{{ ="abc"}}'), 'abc')
@@ -65,7 +66,7 @@ class TestTemplate(unittest.TestCase):
def testWithDummyFileSystem(self):
from os.path import join as pjoin
import contextlib
from StringIO import StringIO
from gluon._compat import StringIO
from gluon.restricted import RestrictedError
@contextlib.contextmanager