diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-02-20 19:55:06 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-02-20 19:55:06 -0500 |
commit | 6cc1d50c14f121d341a3d25fcb0681eafea46a2c (patch) | |
tree | e3be764ade34b38ee6a5ee6f6bf67888b4bd1eba /test/test_lookup.py | |
parent | 6c06a3270b6fca6d959fff4c81cf932e17a475d2 (diff) | |
download | external_python_mako-6cc1d50c14f121d341a3d25fcb0681eafea46a2c.tar.gz external_python_mako-6cc1d50c14f121d341a3d25fcb0681eafea46a2c.tar.bz2 external_python_mako-6cc1d50c14f121d341a3d25fcb0681eafea46a2c.zip |
- use deque instead of list for FastEncodingBuffer
- don't call os.stat twice !
- tee hee !
Diffstat (limited to 'test/test_lookup.py')
-rw-r--r-- | test/test_lookup.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test_lookup.py b/test/test_lookup.py index cfbb085..190d8a5 100644 --- a/test/test_lookup.py +++ b/test/test_lookup.py @@ -63,3 +63,14 @@ class LookupTest(unittest.TestCase): tl._uri_cache[('foo', 'bar')] = '/some/path' assert tl._uri_cache[('foo', 'bar')] == '/some/path' + def test_check_not_found(self): + tl = lookup.TemplateLookup() + tl.put_string("foo", "this is a template") + f = tl.get_template("foo") + assert f.uri in tl._collection + f.filename = "nonexistent" + self.assertRaises(exceptions.TemplateLookupException, + tl.get_template, "foo" + ) + assert f.uri not in tl._collection + |