Back to index

plone3  3.1.7
test_exportimport.py
Go to the documentation of this file.
00001 from OFS.Folder import Folder
00002 
00003 from persistent.dict import PersistentDict
00004 from zope.component import getUtility
00005 from zope.component import getSiteManager
00006 from zope.app.component.hooks import setHooks, setSite
00007 
00008 from Products.GenericSetup.tests.common import BaseRegistryTests
00009 from Products.GenericSetup.tests.common import DummyExportContext
00010 from Products.GenericSetup.tests.common import DummyImportContext
00011 
00012 from Products.CMFPlone.exportimport.tests.base import BodyAdapterTestCase
00013 from Products.CMFPlone.setuphandlers import PloneGenerator
00014 
00015 from plone.app.viewletmanager.interfaces import IViewletSettingsStorage
00016 from plone.app.viewletmanager.storage import ViewletSettingsStorage
00017 
00018 COMMON_SETUP_ORDER = {
00019     'basic': {'top': ('one',)},
00020     'fancy': {'top': ('two', 'three', 'one')},
00021     }
00022 
00023 COMMON_SETUP_HIDDEN = {
00024     'light': {'top': ('two',)},
00025     }
00026 
00027 _VIEWLETS_XML = """\
00028 <?xml version="1.0"?>
00029 <object>
00030  <order manager="top" skinname="fancy">
00031   <viewlet name="two"/>
00032   <viewlet name="three"/>
00033   <viewlet name="one"/>
00034  </order>
00035  <order manager="top" skinname="basic">
00036   <viewlet name="one"/>
00037  </order>
00038  <hidden manager="top" skinname="light">
00039   <viewlet name="two"/>
00040  </hidden>
00041 </object>
00042 """
00043 
00044 _EMPTY_EXPORT = """\
00045 <?xml version="1.0"?>
00046 <object />
00047 """
00048 
00049 _CHILD_PURGE_IMPORT = """\
00050 <?xml version="1.0"?>
00051 <object>
00052  <order manager="top" skinname="fancy" purge="True" />
00053  <hidden manager="top" skinname="light" purge="True" />
00054 </object>
00055 """
00056 
00057 
00058 _FRAGMENT1_IMPORT = """\
00059 <?xml version="1.0"?>
00060 <object>
00061  <order manager="top" skinname="fancy">
00062   <viewlet name="three" insert-before="two"/>
00063  </order>
00064 </object>
00065 """
00066 
00067 _FRAGMENT2_IMPORT = """\
00068 <?xml version="1.0"?>
00069 <object>
00070  <order manager="top" skinname="*">
00071   <viewlet name="four" insert-after="three"/>
00072  </order>
00073 </object>
00074 """
00075 
00076 _FRAGMENT3_IMPORT = """\
00077 <?xml version="1.0"?>
00078 <object>
00079  <order manager="top" skinname="*">
00080   <viewlet name="three" insert-before="*"/>
00081   <viewlet name="four" insert-after="*"/>
00082  </order>
00083 </object>
00084 """
00085 
00086 _FRAGMENT4_IMPORT = """\
00087 <?xml version="1.0"?>
00088 <object>
00089  <order manager="top" skinname="*">
00090   <viewlet name="three" remove="1"/>
00091  </order>
00092 </object>
00093 """
00094 
00095 _FRAGMENT5_IMPORT = """\
00096 <?xml version="1.0"?>
00097 <object>
00098  <order manager='top' skinname="existing" based-on="fancy">
00099  </order>
00100  <order manager='top' skinname="new" based-on="fancy">
00101   <viewlet name="three" insert-before="two"/>
00102  </order>
00103  <order manager='top' skinname="wrongbase" based-on="invalid_base_id">
00104   <viewlet name="two"/>
00105  </order>
00106 </object>"""
00107 
00108 _FRAGMENT6_IMPORT = """\
00109 <?xml version="1.0"?>
00110 <object>
00111  <order manager="top" skinname="added" make_default="True">
00112   <viewlet name="one"/>
00113   <viewlet name="two"/>
00114   <viewlet name="three"/>
00115  </order>
00116  <hidden manager="top" skinname="added" make_default="True">
00117   <viewlet name="two"/>
00118  </hidden>
00119 </object>
00120 """
00121 
00122 class Layer:
00123     @classmethod
00124     def setUp(cls):
00125         from zope.component import provideAdapter
00126         
00127         from plone.app.viewletmanager.exportimport.storage import ViewletSettingsStorageNodeAdapter
00128         from Products.GenericSetup.interfaces import IBody
00129         from plone.app.viewletmanager.interfaces import IViewletSettingsStorage
00130         from Products.GenericSetup.interfaces import ISetupEnviron
00131         
00132         provideAdapter(factory=ViewletSettingsStorageNodeAdapter, 
00133             adapts=(IViewletSettingsStorage, ISetupEnviron),
00134             provides=IBody)
00135 
00136 class ViewletSettingsStorageXMLAdapterTests(BodyAdapterTestCase):
00137     
00138     layer = Layer
00139 
00140     def _getTargetClass(self):
00141         from plone.app.viewletmanager.exportimport.storage \
00142                     import ViewletSettingsStorageNodeAdapter
00143         return ViewletSettingsStorageNodeAdapter
00144 
00145     def _populate(self, obj):
00146         obj.setOrder('top', 'fancy', ('two', 'three', 'one'))
00147         obj.setOrder('top', 'basic', ('one',))
00148         obj.setHidden('top', 'light', ('two',))
00149 
00150     def _verifyImport(self, obj):
00151         fancydict = {'top': ('two', 'three', 'one')}
00152         hiddendict = {'top': ('two',)}
00153         self.assertEqual(type(obj._order), PersistentDict)
00154         self.failUnless('fancy' in obj._order.keys())
00155         self.assertEqual(type(obj._order['fancy']), PersistentDict)
00156         self.assertEqual(dict(obj._order['fancy']), fancydict)
00157         self.assertEqual(type(obj._hidden), PersistentDict)
00158         self.failUnless('light' in obj._hidden.keys())
00159         self.assertEqual(type(obj._hidden['light']), PersistentDict)
00160         self.assertEqual(dict(obj._hidden['light']), hiddendict)
00161 
00162     def setUp(self):
00163         setHooks()
00164         self.site = Folder('site')
00165         gen = PloneGenerator()
00166         gen.enableSite(self.site)
00167         setSite(self.site)
00168         sm = getSiteManager()
00169         sm.registerUtility(ViewletSettingsStorage(), IViewletSettingsStorage)
00170 
00171         self._obj = getUtility(IViewletSettingsStorage)
00172 
00173         self._BODY = _VIEWLETS_XML
00174 
00175 class _ViewletSettingsStorageSetup(BaseRegistryTests):
00176 
00177     layer = Layer
00178 
00179     def setUp(self):
00180         BaseRegistryTests.setUp(self)
00181         setHooks()
00182         self.root.site = Folder(id='site')
00183         self.site = self.root.site
00184         gen = PloneGenerator()
00185         gen.enableSite(self.site)
00186         setSite(self.site)
00187         sm = getSiteManager(self.site)
00188         sm.registerUtility(ViewletSettingsStorage(), IViewletSettingsStorage)
00189         self.storage = getUtility(IViewletSettingsStorage)
00190 
00191     def _populateSite(self, order={}, hidden={}):
00192         storage = self.storage
00193         for skinname in order.keys():
00194             for manager in order[skinname].keys():
00195                 self.storage.setOrder(manager, skinname,
00196                                             order[skinname][manager])
00197 
00198         for skinname in hidden.keys():
00199             for manager in hidden[skinname].keys():
00200                 self.storage.setHidden(manager, skinname,
00201                                             hidden[skinname][manager])
00202 
00203 
00204 class exportViewletSettingsStorageTests(_ViewletSettingsStorageSetup):
00205 
00206     def test_empty(self):
00207         from plone.app.viewletmanager.exportimport.storage import \
00208                                                 exportViewletSettingsStorage
00209 
00210         context = DummyExportContext(self.site)
00211         exportViewletSettingsStorage(context)
00212 
00213         self.assertEqual(len(context._wrote), 1)
00214         filename, text, content_type = context._wrote[0]
00215         self.assertEqual(filename, 'viewlets.xml')
00216         self._compareDOM(text, _EMPTY_EXPORT)
00217         self.assertEqual(content_type, 'text/xml')
00218 
00219     def test_normal(self):
00220         from plone.app.viewletmanager.exportimport.storage import \
00221                                                 exportViewletSettingsStorage
00222 
00223         _ORDER = COMMON_SETUP_ORDER
00224         _HIDDEN = COMMON_SETUP_HIDDEN
00225         self._populateSite(order=_ORDER, hidden=_HIDDEN)
00226         
00227         context = DummyExportContext(self.site)
00228         exportViewletSettingsStorage(context)
00229 
00230         self.assertEqual(len(context._wrote), 1)
00231         filename, text, content_type = context._wrote[0]
00232         self.assertEqual(filename, 'viewlets.xml')
00233         self._compareDOM(text, _VIEWLETS_XML)
00234         self.assertEqual(content_type, 'text/xml')
00235 
00236 
00237 class importViewletSettingsStorageTests(_ViewletSettingsStorageSetup):
00238 
00239     _VIEWLETS_XML = _VIEWLETS_XML
00240     _EMPTY_EXPORT = _EMPTY_EXPORT
00241     _CHILD_PURGE_IMPORT = _CHILD_PURGE_IMPORT
00242     _FRAGMENT1_IMPORT = _FRAGMENT1_IMPORT
00243     _FRAGMENT2_IMPORT = _FRAGMENT2_IMPORT
00244     _FRAGMENT3_IMPORT = _FRAGMENT3_IMPORT
00245     _FRAGMENT4_IMPORT = _FRAGMENT4_IMPORT
00246     _FRAGMENT5_IMPORT = _FRAGMENT5_IMPORT
00247     _FRAGMENT6_IMPORT = _FRAGMENT6_IMPORT
00248 
00249     def test_empty_default_purge(self):
00250         from plone.app.viewletmanager.exportimport.storage import \
00251                                                 importViewletSettingsStorage
00252 
00253         _ORDER = COMMON_SETUP_ORDER
00254         _HIDDEN = COMMON_SETUP_HIDDEN
00255         self._populateSite(order=_ORDER, hidden=_HIDDEN)
00256 
00257         site = self.site
00258         utility = self.storage
00259 
00260         self.assertEqual(len(utility.getOrder('top', 'fancy')), 3)
00261         self.assertEqual(len(utility.getOrder('top', 'basic')), 1)
00262         self.assertEqual(len(utility.getHidden('top', 'light')), 1)
00263         self.assertEqual(len(utility.getOrder('top', 'undefined')), 3)
00264 
00265         context = DummyImportContext(site)
00266         context._files['viewlets.xml'] = self._EMPTY_EXPORT
00267         importViewletSettingsStorage(context)
00268 
00269         self.assertEqual(len(utility.getOrder('top', 'fancy')), 0)
00270         self.assertEqual(len(utility.getOrder('top', 'basic')), 0)
00271         self.assertEqual(len(utility.getHidden('top', 'light')), 0)
00272         self.assertEqual(len(utility.getOrder('top', 'undefined')), 0)
00273 
00274     def test_empty_explicit_purge(self):
00275         from plone.app.viewletmanager.exportimport.storage import \
00276                                                 importViewletSettingsStorage
00277 
00278         _ORDER = COMMON_SETUP_ORDER
00279         _HIDDEN = COMMON_SETUP_HIDDEN
00280         self._populateSite(order=_ORDER, hidden=_HIDDEN)
00281 
00282         site = self.site
00283         utility = self.storage
00284 
00285         self.assertEqual(len(utility.getOrder('top', 'fancy')), 3)
00286         self.assertEqual(len(utility.getOrder('top', 'basic')), 1)
00287         self.assertEqual(len(utility.getHidden('top', 'light')), 1)
00288         self.assertEqual(len(utility.getOrder('top', 'undefined')), 3)
00289 
00290         context = DummyImportContext(site, True)
00291         context._files['viewlets.xml'] = self._EMPTY_EXPORT
00292         importViewletSettingsStorage(context)
00293 
00294         self.assertEqual(len(utility.getOrder('top', 'fancy')), 0)
00295         self.assertEqual(len(utility.getOrder('top', 'basic')), 0)
00296         self.assertEqual(len(utility.getHidden('top', 'light')), 0)
00297         self.assertEqual(len(utility.getOrder('top', 'undefined')), 0)
00298 
00299     def test_empty_skip_purge(self):
00300         from plone.app.viewletmanager.exportimport.storage import \
00301                                                 importViewletSettingsStorage
00302 
00303         _ORDER = COMMON_SETUP_ORDER
00304         _HIDDEN = COMMON_SETUP_HIDDEN
00305         self._populateSite(order=_ORDER, hidden=_HIDDEN)
00306 
00307         site = self.site
00308         utility = self.storage
00309 
00310         self.assertEqual(len(utility.getOrder('top', 'fancy')), 3)
00311         self.assertEqual(len(utility.getOrder('top', 'basic')), 1)
00312         self.assertEqual(len(utility.getHidden('top', 'light')), 1)
00313         self.assertEqual(len(utility.getOrder('top', 'undefined')), 3)
00314 
00315         context = DummyImportContext(site, False)
00316         context._files['viewlets.xml'] = self._EMPTY_EXPORT
00317         importViewletSettingsStorage(context)
00318 
00319         self.assertEqual(len(utility.getOrder('top', 'fancy')), 3)
00320         self.assertEqual(len(utility.getOrder('top', 'basic')), 1)
00321         self.assertEqual(len(utility.getHidden('top', 'light')), 1)
00322         self.assertEqual(len(utility.getOrder('top', 'undefined')), 3)
00323 
00324     def test_specific_child_purge(self):
00325         from plone.app.viewletmanager.exportimport.storage import \
00326                                                 importViewletSettingsStorage
00327 
00328         _ORDER = COMMON_SETUP_ORDER
00329         _HIDDEN = COMMON_SETUP_HIDDEN
00330         self._populateSite(order=_ORDER, hidden=_HIDDEN)
00331 
00332         site = self.site
00333         utility = self.storage
00334 
00335         self.assertEqual(len(utility.getOrder('top', 'fancy')), 3)
00336         self.assertEqual(len(utility.getOrder('top', 'basic')), 1)
00337         self.assertEqual(len(utility.getHidden('top', 'light')), 1)
00338         self.assertEqual(len(utility.getOrder('top', 'undefined')), 3)
00339 
00340         context = DummyImportContext(site, False)
00341         context._files['viewlets.xml'] = self._CHILD_PURGE_IMPORT
00342         importViewletSettingsStorage(context)
00343 
00344         self.assertEqual(len(utility.getOrder('top', 'fancy')), 0)
00345         self.assertEqual(len(utility.getOrder('top', 'basic')), 1)
00346         self.assertEqual(len(utility.getHidden('top', 'light')), 0)
00347         self.assertEqual(len(utility.getOrder('top', 'undefined')), 0)
00348 
00349     def test_normal(self):
00350         from plone.app.viewletmanager.exportimport.storage import \
00351                                                 importViewletSettingsStorage
00352 
00353         site = self.site
00354         utility = self.storage
00355         self.assertEqual(len(utility._order.keys()), 0)
00356         self.assertEqual(len(utility._hidden.keys()), 0)
00357 
00358         context = DummyImportContext(site, False)
00359         context._files['viewlets.xml'] = self._VIEWLETS_XML
00360         importViewletSettingsStorage(context)
00361 
00362         self.assertEqual(utility.getOrder('top', 'fancy'),
00363                                             ('two', 'three', 'one'))
00364         self.assertEqual(utility.getOrder('top', 'undefined (fallback)'),
00365                                             ('two', 'three', 'one'))
00366         self.assertEqual(utility.getOrder('top', 'basic'), ('one',))
00367         self.assertEqual(utility.getHidden('top', 'light'), ('two',))
00368 
00369     def test_fragment_skip_purge(self):
00370         from plone.app.viewletmanager.exportimport.storage import \
00371                                                 importViewletSettingsStorage
00372 
00373         _ORDER = COMMON_SETUP_ORDER
00374         _HIDDEN = COMMON_SETUP_HIDDEN
00375         self._populateSite(order=_ORDER, hidden=_HIDDEN)
00376 
00377         site = self.site
00378         utility = self.storage
00379         self.assertEqual(len(utility._order.keys()), 2)
00380         self.assertEqual(len(utility._hidden.keys()), 1)
00381 
00382         self.assertEqual(utility.getOrder('top', 'fancy'),
00383                                     ('two', 'three', 'one'))
00384         self.assertEqual(utility.getOrder('top', 'undefined (fallback)'),
00385                                     ('two', 'three', 'one'))
00386         self.assertEqual(utility.getOrder('top', 'basic'), ('one',))
00387         self.assertEqual(utility.getHidden('top', 'light'), ('two',))
00388 
00389         context = DummyImportContext(site, False)
00390         context._files['viewlets.xml'] = self._FRAGMENT1_IMPORT
00391         importViewletSettingsStorage(context)
00392 
00393         self.assertEqual(utility.getOrder('top', 'basic'), ('one',))
00394         self.assertEqual(utility.getOrder('top', 'fancy'),
00395                                             ('three', 'two', 'one'))
00396         self.assertEqual(utility.getHidden('top', 'light'), ('two',))
00397 
00398         context._files['viewlets.xml'] = self._FRAGMENT2_IMPORT
00399         importViewletSettingsStorage(context)
00400 
00401         self.assertEqual(len(utility._order.keys()), 2)
00402         self.assertEqual(len(utility._hidden.keys()), 1)
00403 
00404         self.assertEqual(utility.getOrder('top', 'fancy'),
00405                                     ('three', 'four', 'two', 'one'))
00406         self.assertEqual(utility.getOrder('top', 'basic'),
00407                                             ('one', 'four'))
00408         self.assertEqual(utility.getHidden('top', 'light'), ('two',))
00409 
00410         context._files['viewlets.xml'] = self._FRAGMENT1_IMPORT
00411         importViewletSettingsStorage(context)
00412 
00413         self.assertEqual(utility.getOrder('top', 'fancy'),
00414                                     ('four', 'three', 'two', 'one'))
00415 
00416     def test_fragment3_skip_purge(self):
00417         from plone.app.viewletmanager.exportimport.storage import \
00418                                                 importViewletSettingsStorage
00419 
00420         _ORDER = COMMON_SETUP_ORDER
00421         _HIDDEN = COMMON_SETUP_HIDDEN
00422         self._populateSite(order=_ORDER, hidden=_HIDDEN)
00423 
00424         site = self.site
00425         utility = self.storage
00426         self.assertEqual(len(utility._order.keys()), 2)
00427         self.assertEqual(len(utility._hidden.keys()), 1)
00428 
00429         self.assertEqual(utility.getOrder('top', 'fancy'),
00430                                     ('two', 'three', 'one'))
00431         self.assertEqual(utility.getOrder('top', 'undefined (fallback)'),
00432                                     ('two', 'three', 'one'))
00433         self.assertEqual(utility.getOrder('top', 'basic'), ('one',))
00434         self.assertEqual(utility.getHidden('top', 'light'), ('two',))
00435 
00436         context = DummyImportContext(site, False)
00437         context._files['viewlets.xml'] = self._FRAGMENT3_IMPORT
00438         importViewletSettingsStorage(context)
00439 
00440         self.assertEqual(utility.getOrder('top', 'basic'),
00441                                                 ('three', 'one', 'four'))
00442         self.assertEqual(utility.getOrder('top', 'fancy'),
00443                                             ('three', 'two', 'one', 'four'))
00444         self.assertEqual(utility.getHidden('top', 'light'), ('two',))
00445 
00446     def test_fragment4_remove(self):
00447         from plone.app.viewletmanager.exportimport.storage import \
00448                                                 importViewletSettingsStorage
00449 
00450         _ORDER = COMMON_SETUP_ORDER
00451         _HIDDEN = COMMON_SETUP_HIDDEN
00452         self._populateSite(order=_ORDER, hidden=_HIDDEN)
00453 
00454         site = self.site
00455         utility = self.storage
00456         self.assertEqual(len(utility._order.keys()), 2)
00457         self.assertEqual(len(utility._hidden.keys()), 1)
00458 
00459         self.assertEqual(utility.getOrder('top', 'fancy'),
00460                                     ('two', 'three', 'one'))
00461         self.assertEqual(utility.getOrder('top', 'undefined (fallback)'),
00462                                     ('two', 'three', 'one'))
00463         self.assertEqual(utility.getOrder('top', 'basic'), ('one',))
00464         self.assertEqual(utility.getHidden('top', 'light'), ('two',))
00465 
00466         context = DummyImportContext(site, False)
00467         context._files['viewlets.xml'] = self._FRAGMENT4_IMPORT
00468         importViewletSettingsStorage(context)
00469 
00470         self.assertEqual(utility.getOrder('top', 'basic'), ('one',))
00471         self.assertEqual(utility.getOrder('top', 'fancy'), ('two', 'one'))
00472         self.assertEqual(utility.getHidden('top', 'light'), ('two',))
00473 
00474     def test_fragment5_based_on(self):
00475         from plone.app.viewletmanager.exportimport.storage import \
00476                                                 importViewletSettingsStorage
00477 
00478         _ORDER = COMMON_SETUP_ORDER
00479         _HIDDEN = COMMON_SETUP_HIDDEN
00480         self._populateSite(order=_ORDER, hidden=_HIDDEN)
00481 
00482         site = self.site
00483         utility = self.storage
00484         self.assertEqual(len(utility._order.keys()), 2)
00485         self.assertEqual(len(utility._hidden.keys()), 1)
00486 
00487         self.assertEqual(utility.getOrder('top', 'fancy'),
00488                                     ('two', 'three', 'one'))
00489         self.assertEqual(utility.getOrder('top', 'undefined (fallback)'),
00490                                     ('two', 'three', 'one'))
00491         self.assertEqual(utility.getOrder('top', 'basic'), ('one',))
00492         self.assertEqual(utility.getHidden('top', 'light'), ('two',))
00493 
00494         context = DummyImportContext(site, False)
00495         context._files['viewlets.xml'] = self._FRAGMENT5_IMPORT
00496         importViewletSettingsStorage(context)
00497 
00498         self.assertEqual(len(utility._order.keys()), 5)
00499 
00500         self.assertEqual(utility.getOrder('top', 'fancy'),
00501                                     ('two', 'three', 'one'))
00502         self.assertEqual(utility.getOrder('top', 'existing'),
00503                                     ('two', 'three', 'one'))
00504         self.assertEqual(utility.getOrder('top', 'new'),
00505                                     ('three', 'two', 'one'))
00506         self.assertEqual(utility.getOrder('top', 'wrongbase'), ('two',))
00507         self.assertEqual(utility.getOrder('top', 'undefined (fallback)'),
00508                                     ('two', 'three', 'one'))
00509         self.assertEqual(utility.getOrder('top', 'basic'), ('one',))
00510         self.assertEqual(utility.getHidden('top', 'light'), ('two',))
00511 
00512     def test_fragment6_make_default(self):
00513         from plone.app.viewletmanager.exportimport.storage import \
00514                                                 importViewletSettingsStorage
00515 
00516         _ORDER = COMMON_SETUP_ORDER
00517         _HIDDEN = COMMON_SETUP_HIDDEN
00518         self._populateSite(order=_ORDER, hidden=_HIDDEN)
00519 
00520         site = self.site
00521         utility = self.storage
00522         self.assertEqual(len(utility._order.keys()), 2)
00523         self.assertEqual(len(utility._hidden.keys()), 1)
00524 
00525         self.assertEqual(utility.getOrder('top', 'fancy'),
00526                                     ('two', 'three', 'one'))
00527         self.assertEqual(utility.getOrder('top', 'undefined (fallback)'),
00528                                     ('two', 'three', 'one'))
00529         self.assertEqual(utility.getOrder('top', 'basic'), ('one',))
00530         self.assertEqual(utility.getHidden('top', 'light'), ('two',))
00531 
00532         context = DummyImportContext(site, False)
00533         context._files['viewlets.xml'] = self._FRAGMENT6_IMPORT
00534         importViewletSettingsStorage(context)
00535 
00536         self.assertEqual(utility.getOrder('top', 'undefined'),
00537                                         ('one', 'two', 'three'))
00538         self.assertEqual(utility.getHidden('top', 'undefined'), ('two',))
00539         
00540     def test_syntax_error_reporting(self):
00541         from plone.app.viewletmanager.exportimport.storage import \
00542                                                 importViewletSettingsStorage
00543         from xml.parsers.expat import ExpatError
00544         site = self.site
00545         context = DummyImportContext(site, False)
00546         context._files['viewlets.xml'] = """<?xml version="1.0"?>\n<"""
00547         self.assertRaises(ExpatError, importViewletSettingsStorage, context)
00548 
00549 def test_suite():
00550     from unittest import TestSuite, makeSuite
00551     suite = TestSuite()
00552     suite.addTest(makeSuite(ViewletSettingsStorageXMLAdapterTests))
00553     suite.addTest(makeSuite(exportViewletSettingsStorageTests))
00554     suite.addTest(makeSuite(importViewletSettingsStorageTests))
00555     return suite
00556 
00557 if __name__ == '__main__':
00558     framework()
00559