[Zope-CVS] CVS: Products/CompositePage/tests - test_composite.py:1.3
Shane Hathaway
shane at zope.com
Fri Mar 12 13:46:17 EST 2004
Update of /cvs-repository/Products/CompositePage/tests
In directory cvs.zope.org:/tmp/cvs-serv637/tests
Modified Files:
test_composite.py
Log Message:
Added a method for discovering the class name of a slot
=== Products/CompositePage/tests/test_composite.py 1.2 => 1.3 ===
--- Products/CompositePage/tests/test_composite.py:1.2 Mon Mar 8 15:03:45 2004
+++ Products/CompositePage/tests/test_composite.py Fri Mar 12 13:46:16 2004
@@ -139,6 +139,13 @@
substr = "near ' b'"
self.assert_(msg.find(substr) >= 0)
+ def testGetSlotClassName(self):
+ self.assertEqual(self.composite.getSlotClassName('slot_a'), 'top')
+ self.assertEqual(self.composite.getSlotClassName('slot_b'), None)
+ self.assertEqual(self.composite.getSlotClassName('slot_c'), None)
+ self.assertRaises(
+ KeyError, self.composite.getSlotClassName, 'nonexistent_slot')
+
if __name__ == "__main__":
unittest.main()
More information about the Zope-CVS
mailing list