[Checkins] SVN: Products.GenericSetup/trunk/Products/GenericSetup/tests/test_tool.py Merged r100351 from branch 1.4

Vincent Fretin vincent.fretin at gmail.com
Sun May 24 17:06:54 EDT 2009


Log message for revision 100352:
  Merged r100351 from branch 1.4

Changed:
  U   Products.GenericSetup/trunk/Products/GenericSetup/tests/test_tool.py

-=-
Modified: Products.GenericSetup/trunk/Products/GenericSetup/tests/test_tool.py
===================================================================
--- Products.GenericSetup/trunk/Products/GenericSetup/tests/test_tool.py	2009-05-24 21:05:58 UTC (rev 100351)
+++ Products.GenericSetup/trunk/Products/GenericSetup/tests/test_tool.py	2009-05-24 21:06:54 UTC (rev 100352)
@@ -1016,8 +1016,26 @@
         self.failUnless(u'toolset' in result)
         self.failUnless(list(result).index(u'componentregistry') >
                         list(result).index(u'toolset'))
+    
+    def test_listProfileInfo_for_parameter(self):
+        from Products.GenericSetup.metadata import METADATA_XML
+        from Products.GenericSetup.tests.test_registry import ISite, IDerivedSite, IAnotherSite
 
+        self._makeFile(METADATA_XML, _METADATA_XML)
 
+        site = self._makeSite()
+        tool = self._makeOne('setup_tool').__of__( site )
+
+        profile_registry.registerProfile('foo', 'Foo', '', self._PROFILE_PATH,
+                                        for_=ISite)
+        # tool.listProfileInfo should call registry.listProfileInfo
+        # with the for_ parameter
+        self.assertEqual(len(tool.listProfileInfo()), 1)
+        self.assertEqual(len(tool.listProfileInfo(for_=ISite)), 1)
+        self.assertEqual(len(tool.listProfileInfo(for_=IDerivedSite)), 1)
+        self.assertEqual(len(tool.listProfileInfo(for_=IAnotherSite)), 0)
+
+
 _DEFAULT_STEP_REGISTRIES_EXPORT_XML = """\
 <?xml version="1.0"?>
 <export-steps>



More information about the Checkins mailing list