[CMF-checkins] CVS: CMF/CMFSetup/tests - test_utils.py:1.7
Florent Guillaume
fg at nuxeo.com
Fri Jun 10 13:47:16 EDT 2005
Update of /cvs-repository/CMF/CMFSetup/tests
In directory cvs.zope.org:/tmp/cvs-serv18758/tests
Modified Files:
test_utils.py
Log Message:
Split ConfiguratorBase into ImportConfiguratorBase and
ExportConfiguratorBase, as they really are unrelated.
=== CMF/CMFSetup/tests/test_utils.py 1.6 => 1.7 ===
--- CMF/CMFSetup/tests/test_utils.py:1.6 Sun May 8 14:59:20 2005
+++ CMF/CMFSetup/tests/test_utils.py Fri Jun 10 13:47:15 2005
@@ -229,25 +229,7 @@
_properties = ()
-class ConfiguratorBaseTests(BaseRegistryTests):
-
- def _getTargetClass(self):
-
- from Products.CMFSetup.utils import ConfiguratorBase
- from Products.CMFSetup.utils import CONVERTER, DEFAULT, KEY
-
- class Configurator(ConfiguratorBase):
-
- def _getExportTemplate(self):
- return None
-
- def _getImportMapping(self):
- return {
- 'dummy':
- { 'property': {KEY: 'properties', DEFAULT: ()},
- 'description': {CONVERTER: self._convertToUnique} } }
-
- return Configurator
+class _ConfiguratorBaseTests(BaseRegistryTests):
def _initSite(self, foo=2):
@@ -286,6 +268,19 @@
return site
+
+class ExportConfiguratorBaseTests(_ConfiguratorBaseTests):
+
+ def _getTargetClass(self):
+
+ from Products.CMFSetup.utils import ExportConfiguratorBase
+
+ class Configurator(ExportConfiguratorBase):
+ def _getExportTemplate(self):
+ return None
+
+ return Configurator
+
def test__extractProperty_normal(self):
site = self._initSite()
@@ -337,6 +332,24 @@
self._compareDOM(xml, _NORMAL_OBJECT_EXPORT)
+
+class ImportConfiguratorBaseTests(_ConfiguratorBaseTests):
+
+ def _getTargetClass(self):
+
+ from Products.CMFSetup.utils import ImportConfiguratorBase
+ from Products.CMFSetup.utils import CONVERTER, DEFAULT, KEY
+
+ class Configurator(ImportConfiguratorBase):
+ def _getImportMapping(self):
+ return {
+ 'dummy':
+ { 'property': {KEY: 'properties', DEFAULT: ()},
+ 'description': {CONVERTER: self._convertToUnique} } }
+
+ return Configurator
+
+
def test_parseXML_normal(self):
site = self._initSite()
@@ -484,7 +497,8 @@
return unittest.TestSuite((
unittest.makeSuite( UtilsTests ),
- unittest.makeSuite( ConfiguratorBaseTests ),
+ unittest.makeSuite( ImportConfiguratorBaseTests ),
+ unittest.makeSuite( ExportConfiguratorBaseTests ),
))
if __name__ == '__main__':
More information about the CMF-checkins
mailing list