[CMF-checkins] CVS: Products/CMFCore/tests - test_ActionProviderBase.py:1.16 test_ActionsTool.py:1.16

Yvo Schubbe y.2004_ at wcm-solutions.de
Mon Jul 19 14:12:06 EDT 2004


Update of /cvs-repository/Products/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv10833/CMFCore/tests

Modified Files:
	test_ActionProviderBase.py test_ActionsTool.py 
Log Message:
merged yuppie-actions-cleanup-branch:
- enforced usage of 'title' instead of 'name', 'url' instead of 'action'
- enforced boolean type of 'visible'
- refactored CMFSetup actions and type-info handling
- updated default profile


=== Products/CMFCore/tests/test_ActionProviderBase.py 1.15 => 1.16 ===
--- Products/CMFCore/tests/test_ActionProviderBase.py:1.15	Fri Jul 16 12:49:21 2004
+++ Products/CMFCore/tests/test_ActionProviderBase.py	Mon Jul 19 14:11:36 2004
@@ -21,9 +21,9 @@
                                   , title='A Title'
                                   , action=''
                                   , condition=''
-                                  , permissions=''
+                                  , permissions=()
                                   , category=''
-                                  , visible=0
+                                  , visible=False
                                   ), )
 
 
@@ -211,8 +211,9 @@
         self.assertEqual( old_ids, another_ids )
 
     def test_listActionInfos(self):
-        wanted = [{'permissions': '', 'id': 'an_id', 'url': '',
-                   'name': 'A Title', 'visible': 0, 'category': 'object'}]
+        wanted = [{'id': 'an_id', 'title': 'A Title', 'name': 'A Title',
+                   'url': '', 'permissions': (), 'category': 'object',
+                   'visible': False }]
 
         apb = self.site._setObject( 'portal_apb', self._makeProvider(1) )
         rval = apb.listActionInfos()
@@ -231,8 +232,9 @@
         self.assertRaises(ValueError, apb.getActionObject, 'wrong_format')
 
     def test_getActionInfo(self):
-        wanted = {'permissions': '', 'id': 'an_id', 'url': '',
-                  'name': 'A Title', 'visible': 0, 'category': 'object'}
+        wanted = {'id': 'an_id', 'title': 'A Title', 'name': 'A Title',
+                  'url': '', 'permissions': (), 'category': 'object',
+                  'visible': False }
 
         apb = self.site._setObject( 'portal_apb', self._makeProvider(1) )
         rval = apb.getActionInfo( ('object/an_id',) )


=== Products/CMFCore/tests/test_ActionsTool.py 1.15 => 1.16 ===
--- Products/CMFCore/tests/test_ActionsTool.py:1.15	Mon Apr 26 08:14:17 2004
+++ Products/CMFCore/tests/test_ActionsTool.py	Mon Jul 19 14:11:36 2004
@@ -66,8 +66,9 @@
                           'folder': [{'permissions': ('List folder contents',),
                                       'id': 'folderContents',
                                       'url': 'http://foo/folder_contents',
+                                      'title': 'Folder contents',
                                       'name': 'Folder contents',
-                                      'visible': 1,
+                                      'visible': True,
                                       'category': 'folder'}],
                           'global': []})
 
@@ -94,8 +95,9 @@
                           [{'permissions': (),
                             'id': 'test',
                             'url': ' a_url',
+                            'title': 'Test',
                             'name': 'Test',
-                            'visible': 1,
+                            'visible': True,
                             'category': 'object'}])
 
     def test_interface(self):



More information about the CMF-checkins mailing list