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

Yvo Schubbe y.2004_ at wcm-solutions.de
Sun Jul 18 17:55:18 EDT 2004


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

Modified Files:
      Tag: yuppie-actions-cleanup-branch
	test_ActionProviderBase.py test_ActionsTool.py 
Log Message:
- added 'getMapping' method to replace some redundant code
- Action 'title' is an alias of 'name'
- Action 'visible' is a boolean
- some related cleanup


=== Products/CMFCore/tests/test_ActionProviderBase.py 1.15 => 1.15.2.1 ===
--- Products/CMFCore/tests/test_ActionProviderBase.py:1.15	Fri Jul 16 12:49:21 2004
+++ Products/CMFCore/tests/test_ActionProviderBase.py	Sun Jul 18 17:55:18 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.15.8.1 ===
--- Products/CMFCore/tests/test_ActionsTool.py:1.15	Mon Apr 26 08:14:17 2004
+++ Products/CMFCore/tests/test_ActionsTool.py	Sun Jul 18 17:55:18 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