Beispiel #1
0
    def test_can_create_a_catalog_from_list_of_templates(self):
        template1 = TemplateCatalogEntry({"name": "wordpress"})
        template2 = TemplateCatalogEntry({"name": "php"})
        catalog = TemplateCatalog([template1, template2])

        self.assertEquals(catalog.size(), 2)
        self.assertEquals(catalog[0].name, "wordpress")
        self.assertEquals(catalog[1].name, "php")
Beispiel #2
0
 def test_can_parse_template_definition(self):
     catalog = TemplateCatalog([{"id" : 1, "name": "wordpress"}])
     self.assertEquals(catalog.size(), 1)
     self.assertEquals(catalog[0].name, "wordpress")