summaryrefslogtreecommitdiff
path: root/test/test_lookup.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-03-02 22:33:04 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2010-03-02 22:33:04 +0000
commit16326e69035fd606dd563eaf322033304da8c20c (patch)
tree738898c127821c01a33dec750e65813876cf791a /test/test_lookup.py
parentcb39883106567571d337ad5cb862de00f5e3a336 (diff)
downloadmako-16326e69035fd606dd563eaf322033304da8c20c.tar.gz
begin to modernize testing. in particular, get rid of test_htdocs as well as ad-hoc
HTML file writing, consistently cleanup the modules/cache directories, use nose skiptests for unsupported features.
Diffstat (limited to 'test/test_lookup.py')
-rw-r--r--test/test_lookup.py18
1 files changed, 2 insertions, 16 deletions
diff --git a/test/test_lookup.py b/test/test_lookup.py
index 81bb7ec..4d6644d 100644
--- a/test/test_lookup.py
+++ b/test/test_lookup.py
@@ -3,23 +3,9 @@ from mako import lookup, exceptions
from util import flatten_result, result_lines
import unittest
-import os
+from test import TemplateTest, template_base, module_base
-if not os.access('./test_htdocs', os.F_OK):
- os.mkdir('./test_htdocs')
-file('./test_htdocs/index.html', 'w').write("this is index")
-file('./test_htdocs/incl.html', 'w').write("this is include 1")
-if not os.access('./test_htdocs/subdir', os.F_OK):
- os.mkdir('./test_htdocs/subdir')
-file('./test_htdocs/subdir/incl.html', 'w').write("""
- this is include 2
-""")
-file('./test_htdocs/subdir/index.html', 'w').write("""
- this is sub index
- <%include file="incl.html"/>
-""")
-
-tl = lookup.TemplateLookup(directories=['./test_htdocs'])
+tl = lookup.TemplateLookup(directories=[template_base])
class LookupTest(unittest.TestCase):
def test_basic(self):
t = tl.get_template('index.html')