[CMF-checkins] CVS: CMF/CMFCore/tests - test_TypesTool.py:1.15.4.1

Chris McDonough chrism@zope.com
Fri, 26 Jul 2002 13:02:10 -0400


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

Modified Files:
      Tag: CMF-1_3-branch
	test_TypesTool.py 
Log Message:
Merge two patches in from trunk:

1.  Cause ActionsTool and TypesTool to return "unmolested" actions
    dictionary from listFilteredActionsFor.  Editing actions via the
    types tool does not destroy un-web-editable entries in a site's
    actions dictionary.

2.  Cause TypesTool's isConstructionAllowed method to not mask construction
    exceptions with Unauthorized.  Also removed the 'raise_exc' argument
    to isConstructionAllowed (it was never part of the interface).
    isConstructionAllowed now never raises an exception.  If an error
    is encountered, a log message is written to the stupid log.


=== CMF/CMFCore/tests/test_TypesTool.py 1.15 => 1.15.4.1 ===
         ti = self._makeInstance( 'foo' )
 
         self.failIf( ti.isConstructionAllowed( None ) )
-        self.failIf( ti.isConstructionAllowed( None, raise_exc=1 ) )
 
         ti = self._makeInstance( 'Foo'
                                , product='FooProduct'
@@ -292,8 +291,6 @@
                                )
 
         self.failIf( ti.isConstructionAllowed( None ) )
-        self.assertRaises( Exception, ti.isConstructionAllowed
-                         , None, raise_exc=1 )
 
     def test_isConstructionAllowed_wo_ProductFactory( self ):
 
@@ -301,11 +298,9 @@
 
         folder = self._makeFolder()
         self.failIf( ti.isConstructionAllowed( folder ) )
-        self.failIf( ti.isConstructionAllowed( folder, raise_exc=1 ) )
 
         folder = self._makeFolder( fake_product=1 )
         self.failIf( ti.isConstructionAllowed( folder ) )
-        self.failIf( ti.isConstructionAllowed( folder, raise_exc=1 ) )
 
     def test_isConstructionAllowed_wo_Security( self ):
 
@@ -316,8 +311,6 @@
         folder = self._makeFolder( fake_product=1 )
 
         self.failIf( ti.isConstructionAllowed( folder ) )
-        self.assertRaises( Unauthorized, ti.isConstructionAllowed
-                         , folder, raise_exc=1 )
 
 class FTIConstructionTests_w_Roles( TestCase ):
 
@@ -355,8 +348,6 @@
 
         newSecurityManager( None
                           , UserWithRoles( 'FooViewer' ).__of__( folder ) )
-        self.assertRaises( Unauthorized, ti.isConstructionAllowed
-                         , folder, raise_exc=1 )
 
     def test_constructInstance_wo_Roles( self ):