Commit 35cf712f by Chris Jerdonek

Stubbed out a unit test for the new RenderEngine class.

parent 5f73682d
# coding: utf-8
"""
Unit tests of renderengine.py.
"""
import cgi
import unittest
from pystache.context import Context
from pystache.renderengine import RenderEngine
class RenderEngineTestCase(unittest.TestCase):
"""Test the RenderEngine class."""
def test_render(self):
escape = lambda s: cgi.escape(unicode(s))
engine = RenderEngine(literal=unicode, escape=escape)
context = Context({'person': 'Mom'})
actual = engine.render('Hi {{person}}', context)
self.assertEquals(actual, 'Hi Mom')
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