def test_defaults(self): t = "$foo" g = GoCaptain(template_str=t, defaults={'foo': 'bar'}) o = StringIO() g.write(o) self.assertEqual(o.getvalue(), "bar")
def test_basic(self): t = "$foo" g = GoCaptain(template_str=t) o = StringIO() g.write(o, foo="bar") self.assertEqual(o.getvalue(), "bar")