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

Tres Seaver tseaver@zope.com
Mon, 10 Dec 2001 17:36:34 -0500


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

Modified Files:
      Tag: CMF-1_2-branch
	test_TypesTool.py 
Log Message:


  - Assorted Zope 2.3 compatibility hacks^H^H^H^H^Hfixes:

    o CatalogTool: Accomodate both versions of 'ZCatalog.catalog_object'
      (Zope 2.4 adds new 'idxs' argument).

    o PortalContent: test for present of WebDAV locking; patch around
      its absence in Zope 2.3.

    o TypesTool: patch around absence of named Unauthorized exception
      in Zope 2.3 and Zope 2.4.

    o Document: patch around absence of WebDAV locking in 2.3.

    o Link: patch around different return value (trailing slash) from
      Python 1.5.2's 'urlparse.urlunparse'.


=== CMF/CMFCore/tests/test_TypesTool.py 1.7 => 1.7.2.1 ===
 
         self.failIf( ti.isConstructionAllowed( folder ) )
-        self.assertRaises( 'Unauthorized', ti.isConstructionAllowed
+        self.assertRaises( Unauthorized, ti.isConstructionAllowed
                          , folder, raise_exc=1 )
 
 class FTIConstructionTests_w_Roles( unittest.TestCase ):
@@ -482,7 +482,7 @@
 
         newSecurityManager( None
                           , UserWithRoles( 'FooViewer' ).__of__( folder ) )
-        self.assertRaises( 'Unauthorized', ti.isConstructionAllowed
+        self.assertRaises( Unauthorized, ti.isConstructionAllowed
                          , folder, raise_exc=1 )
 
     def test_constructInstance_wo_Roles( self ):
@@ -492,7 +492,7 @@
         newSecurityManager( None
                           , UserWithRoles( 'FooViewer' ).__of__( folder ) )
 
-        self.assertRaises( 'Unauthorized'
+        self.assertRaises( Unauthorized
                          , ti.constructInstance, folder, 'foo' )
 
     def test_constructInstance( self ):