[Checkins] SVN: Products.CMFCore/branches/2.2/Products/CMFCore/tests/test_utils.py add test for ImmutableId class
David Glick
davidglick at onenw.org
Mon Sep 20 01:37:03 EDT 2010
Log message for revision 116641:
add test for ImmutableId class
Changed:
U Products.CMFCore/branches/2.2/Products/CMFCore/tests/test_utils.py
-=-
Modified: Products.CMFCore/branches/2.2/Products/CMFCore/tests/test_utils.py
===================================================================
--- Products.CMFCore/branches/2.2/Products/CMFCore/tests/test_utils.py 2010-09-19 12:54:08 UTC (rev 116640)
+++ Products.CMFCore/branches/2.2/Products/CMFCore/tests/test_utils.py 2010-09-20 05:37:02 UTC (rev 116641)
@@ -77,6 +77,16 @@
'Products.CMFCore')
self.assertEqual(getContainingPackage('zope.interface.verify'),
'zope.interface')
+
+ def test_ImmutableId(self):
+ from Products.CMFCore.utils import ImmutableId
+ class Foo(ImmutableId):
+ def getId(self):
+ return 'foo'
+
+ foo = Foo()
+ foo._setId('foo')
+ self.assertRaises(ValueError, foo._setId, 'bar')
class CoreUtilsSecurityTests(SecurityTest):
More information about the checkins
mailing list