def test_get_template_by_id(self): # insert a single template with the id 'sampleid' self.insert_template() my_template = self.registry.get_template_by_id('sampleid') self.assertTrue(ISiteTemplate.providedBy(my_template)) self.assertEquals(my_template.name, "My Name") self.assertEquals(len(my_template.products), 3, "template should have three products listed")
def test_provides_interface(self): self.assertTrue(ISiteTemplate.providedBy(self.template), 'template does not implement ISiteTemplate')