mirror of
https://github.com/kennethreitz-archive/pystache.git
synced 2026-06-05 23:40:16 +00:00
22 lines
625 B
Python
22 lines
625 B
Python
import unittest
|
|
import pystache
|
|
from examples.simple import Simple
|
|
|
|
class TestView(unittest.TestCase):
|
|
def test_basic(self):
|
|
view = Simple("Hi {{thing}}!", { 'thing': 'world' })
|
|
self.assertEquals(view.render(), "Hi world!")
|
|
|
|
def test_kwargs(self):
|
|
view = Simple("Hi {{thing}}!", thing='world')
|
|
self.assertEquals(view.render(), "Hi world!")
|
|
|
|
def test_template_load(self):
|
|
view = Simple(thing='world')
|
|
self.assertEquals(view.render(), "Hi world!")
|
|
|
|
def test_basic_method_calls(self):
|
|
view = Simple()
|
|
self.assertEquals(view.render(), "Hi pizza!")
|
|
|