Home | History | Annotate | Download | only in test

Lines Matching full:substitute

242         self.assertEqual(s.substitute(dict(who='tim', what='ham')),
244 self.assertRaises(KeyError, s.substitute, dict(who='tim'))
245 self.assertRaises(TypeError, Template.substitute)
250 self.assertEqual(s.substitute(d), 'tim likes ham for dinner')
251 self.assertRaises(KeyError, s.substitute,
257 eq(s.substitute(dict(who='tim', what='ham')),
260 eq(s.substitute(dict(who='tim', what='ham')), 'tim likes $')
266 eq(s.substitute(d), '%(foo)s baz baz')
273 eq(s.substitute(d), 'tim has eaten 7 bags of ham today')
276 eq(s.substitute(d), 'tim has eaten 7 bags of ham today')
282 eq(s.substitute(d), "('tim', 'fred') ate ('ham', 'kung pao')")
300 raises(ValueError, s.substitute, dict(who='tim'))
302 raises(ValueError, s.substitute, dict(who='tim'))
304 raises(ValueError, s.substitute, dict(who='tim'))
315 self.assertEqual(s.substitute(m), 'tim likes to eat a bag of ham')
331 self.assertEqual(s.substitute(m), 'tim likes to eat a bag of ham')
342 self.assertRaises(ValueError, s.substitute, {})
358 self.assertRaises(KeyError, t.substitute, {})
359 val = t.substitute({'location': 'Cleveland'})
382 self.assertEqual(s.substitute(d), u't\xffm likes f\xfe\x0ced')
387 eq(s.substitute(who='tim', what='ham'), 'tim likes ham')
388 eq(s.substitute(dict(who='tim'), what='ham'), 'tim likes ham')
389 eq(s.substitute(dict(who='fred', what='kung pao'),
393 eq(s.substitute
395 eq(s.substitute(dict(mapping='one'), mapping='two'),
399 eq(s.substitute(self='bozo'), 'the self is bozo')
416 raises(TypeError, s.substitute, d, {})
428 eq(s.substitute(gift='bud', who='you'), 'this bud is for you &')
429 raises(KeyError, s.substitute)
433 raises(ValueError, s.substitute, dict(gift='bud', who='you'))
439 self.assertEqual(s.substitute(dict(who='tim', what='ham')),