Esempio n. 1
0
    def test_build_child_path(self):
        item = CatalogItem.objects.get(pk=6)
        child_item = CatalogItem(content_type=self.content_type, parent=item)
        self.assert_empty_path(child_item)
        child_item.save()

        self.assertEquals(
            item.path+PATH_SEPARATOR+child_item.slug,
            child_item.path
        )
Esempio n. 2
0
 def test_build_root_path(self):
     item = CatalogItem(content_type=self.content_type)
     self.assert_empty_path(item)
     item.save()
     self.assertEquals(item.slug, item.path)