def METHOD_NAME(self):
    raises = self.assertRaises
    s = Template('$who likes $')
    raises(ValueError, s.substitute, dict(who='tim'))
    s = Template('$who likes ${what)')
    raises(ValueError, s.substitute, dict(who='tim'))
    s = Template('$who likes $100')
    raises(ValueError, s.substitute, dict(who='tim'))