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