[CMF-checkins] CVS: Products/CMFCore/tests -
test_ActionInformation.py:1.15
Yvo Schubbe
y.2005- at wcm-solutions.de
Fri Jun 24 12:09:01 EDT 2005
Update of /cvs-repository/Products/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv13308/CMFCore/tests
Modified Files:
test_ActionInformation.py
Log Message:
overrode copy to make sure _lazy_keys is a copy
=== Products/CMFCore/tests/test_ActionInformation.py 1.14 => 1.15 ===
--- Products/CMFCore/tests/test_ActionInformation.py:1.14 Wed Jun 15 10:17:38 2005
+++ Products/CMFCore/tests/test_ActionInformation.py Fri Jun 24 12:09:01 2005
@@ -222,6 +222,18 @@
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