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

Florent Guillaume fg at nuxeo.com
Wed Jul 7 11:53:14 EDT 2004


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

Modified Files:
	test_TypesTool.py 
Log Message:
Small refactoring to provide a ti._constructInstance method that does no
security check when building the instance.



=== Products/CMFCore/tests/test_TypesTool.py 1.29 => 1.30 ===
--- Products/CMFCore/tests/test_TypesTool.py:1.29	Mon Apr 26 08:14:17 2004
+++ Products/CMFCore/tests/test_TypesTool.py	Wed Jul  7 11:53:14 2004
@@ -542,6 +542,14 @@
         foo = folder._getOb( 'foo' )
         self.assertEqual( foo.id, 'foo' )
 
+    def test_constructInstance_private(self):
+        ti, folder = self._makeStuff()
+        newSecurityManager(None,
+                           UserWithRoles('NotAFooAdder').__of__(folder))
+        ti._constructInstance(folder, 'foo')
+        foo = folder._getOb('foo')
+        self.assertEqual(foo.id, 'foo')
+
     def test_constructInstance_w_args_kw( self ):
 
         ti, folder = self._makeStuff()



More information about the CMF-checkins mailing list