def test_with_icon(self): from Products.CMFActionIcons.exportimport import exportActionIconsTool site = self._initSite(with_icon=True) context = DummyExportContext(site) exportActionIconsTool(context) self.assertEqual(len(context._wrote), 1) filename, text, content_type = context._wrote[0] self.assertEqual(filename, "actionicons.xml") self._compareDOM(text, self._WITH_ICON_EXPORT) self.assertEqual(content_type, "text/xml")
def test_with_icon(self): from Products.CMFActionIcons.exportimport \ import exportActionIconsTool site = self._initSite(with_icon=True) context = DummyExportContext(site) exportActionIconsTool(context) self.assertEqual(len(context._wrote), 1) filename, text, content_type = context._wrote[0] self.assertEqual(filename, 'actionicons.xml') self._compareDOM(text, self._WITH_ICON_EXPORT) self.assertEqual(content_type, 'text/xml')
def test_empty(self): from Products.CMFActionIcons.exportimport \ import exportActionIconsTool site = self._initSite(with_icon=False) context = DummyExportContext(site) exportActionIconsTool(context) self.assertEqual(len(context._wrote), 1) filename, text, content_type = context._wrote[0] self.assertEqual(filename, 'actionicons.xml') self._compareDOM(text, self._EMPTY_EXPORT) self.assertEqual(content_type, 'text/xml')