[CMF-checkins] CVS: Products/CMFCore/tests -
test_ActionInformation.py:1.10.2.4
Yvo Schubbe
y.2005- at wcm-solutions.de
Thu Jun 23 04:24:57 EDT 2005
Update of /cvs-repository/Products/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv29035/CMFCore/tests
Modified Files:
Tag: CMF-1_5-branch
test_ActionInformation.py
Log Message:
overrode copy to make sure _lazy_keys is a copy
=== Products/CMFCore/tests/test_ActionInformation.py 1.10.2.3 => 1.10.2.4 ===
--- Products/CMFCore/tests/test_ActionInformation.py:1.10.2.3 Wed Jun 15 06:14:29 2005
+++ Products/CMFCore/tests/test_ActionInformation.py Thu Jun 23 04:24:56 2005
@@ -128,6 +128,19 @@
self.assertEqual( ai['allowed'], WANTED['allowed'] )
self.assertEqual( ai, WANTED )
+ def test_copy(self):
+
+ action = {'name': 'foo', 'url': '', 'permissions': ('View',)}
+ ec = createExprContext(self.site, self.site, None)
+ ai = self._makeOne(action, ec)
+ ai2 = ai.copy()
+
+ self.assertEqual( ai._lazy_keys, ['allowed'] )
+ self.assertEqual( ai2._lazy_keys, ['allowed'] )
+ self.failIf( ai2._lazy_keys is ai._lazy_keys )
+ self.assertEqual( ai['allowed'], True )
+ self.assertEqual( ai2['allowed'], True )
+
class ActionInformationTests(TransactionalTest):
More information about the CMF-checkins
mailing list