Exemplo n.º 1
0
    def test_register_tile_type_for_vocabulary(self):
        from plone.app.tiles.vocabularies import available_tiles_vocabulary
        from zope.component import getGlobalSiteManager
        gsm = getGlobalSiteManager()

        class TestTile(object):
            pass

        test_tile = TestTile()
        gsm.registerUtility(test_tile, ITileType)
        # XXX: This should be 0. The two demo tiles have to be removed.
        self.assertEqual(len(available_tiles_vocabulary(self.portal)), 3)
Exemplo n.º 2
0
    def test_register_tile_type_for_vocabulary(self):
        from plone.app.tiles.vocabularies import available_tiles_vocabulary
        from zope.component import getGlobalSiteManager
        gsm = getGlobalSiteManager()

        class TestTile(object):
            pass

        test_tile = TestTile()
        gsm.registerUtility(test_tile, ITileType)
        # XXX: This should be 0. The two demo tiles have to be removed.
        self.assertEqual(len(available_tiles_vocabulary(self.portal)), 3)
Exemplo n.º 3
0
 def test_empty_vocabulary(self):
     from plone.app.tiles.vocabularies import available_tiles_vocabulary
     # XXX: This should be 0. The two demo tiles have to be removed.
     self.assertEqual(len(available_tiles_vocabulary(self.portal)), 2)
Exemplo n.º 4
0
 def test_empty_vocabulary(self):
     from plone.app.tiles.vocabularies import available_tiles_vocabulary
     # XXX: This should be 0. The two demo tiles have to be removed.
     self.assertEqual(len(available_tiles_vocabulary(self.portal)), 2)