[CMF-checkins] CVS: CMF/CMFCore/tests - test_ActionProviderBase.py:1.8.32.2

Yvo Schubbe cvs-admin at zope.org
Thu Nov 27 09:31:12 EST 2003


Update of /cvs-repository/CMF/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv29041/CMFCore/tests

Modified Files:
      Tag: yuppie-listActionInfos-branch
	test_ActionProviderBase.py 
Log Message:
more tests


=== CMF/CMFCore/tests/test_ActionProviderBase.py 1.8.32.1 => 1.8.32.2 ===
--- CMF/CMFCore/tests/test_ActionProviderBase.py:1.8.32.1	Tue Nov 25 08:59:56 2003
+++ CMF/CMFCore/tests/test_ActionProviderBase.py	Thu Nov 27 09:31:11 2003
@@ -164,18 +164,28 @@
         self.assertEqual( old_ids, another_ids )
 
     def test_listActionInfos(self):
+        wanted = [{'permissions': '', 'id': 'an_id', 'url': '',
+                   'name': 'A Title', 'visible': 0, 'category': 'object'}]
+
         apb = self.site._setObject( 'portal_apb', self._makeProvider(1) )
         rval = apb.listActionInfos()
         self.assertEqual( rval, [] )
         rval = apb.listActionInfos(check_visibility=0)
-        self.assertEqual( rval, [{'permissions': '', 'id': 'an_id', 'url': '',
-                     'name': 'A Title', 'visible': 0, 'category': 'object'}] )
+        self.assertEqual( rval, wanted )
+        rval = apb.listActionInfos('foo/another_id', check_visibility=0)
+        self.assertEqual( rval, [] )
 
     def test_getActionInfo(self):
+        wanted = {'permissions': '', 'id': 'an_id', 'url': '',
+                  'name': 'A Title', 'visible': 0, 'category': 'object'}
+
         apb = self.site._setObject( 'portal_apb', self._makeProvider(1) )
         rval = apb.getActionInfo( ('object/an_id',) )
-        self.assertEqual( rval, {'permissions': '', 'id': 'an_id', 'url': '',
-                      'name': 'A Title', 'visible': 0, 'category': 'object'} )
+        self.assertEqual( rval, wanted )
+        rval = apb.getActionInfo('object/an_id')
+        self.assertEqual( rval, wanted )
+        rval = apb.getActionInfo('object/an_id', check_visibility=1)
+        self.assertEqual( rval, None )
 
     def test_interface(self):
         from Products.CMFCore.interfaces.portal_actions \




More information about the CMF-checkins mailing list