Commit 3c83ed33 by Chris Jerdonek

Minor clean-ups of tests/test_loader.py.

parent 4e20cc2f
import unittest
import pystache
class TestLoader(unittest.TestCase):
from pystache.loader import Loader
class LoaderTestCase(unittest.TestCase):
def test_template_is_loaded(self):
loader = pystache.Loader()
loader = Loader()
template = loader.load_template('simple', 'examples')
self.assertEqual(template, 'Hi {{thing}}!{{blank}}')
def test_using_list_of_paths(self):
loader = pystache.Loader()
loader = Loader()
template = loader.load_template('simple', ['doesnt_exist', 'examples'])
self.assertEqual(template, 'Hi {{thing}}!{{blank}}')
def test_non_existent_template_fails(self):
loader = pystache.Loader()
self.assertRaises(IOError, loader.load_template, 'simple', 'doesnt_exist')
\ No newline at end of file
loader = Loader()
self.assertRaises(IOError, loader.load_template, 'simple', 'doesnt_exist')
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