[Zope-CVS] CVS: Products/QueueCatalog/tests -
test_QueueCatalog.py:1.2
Casey Duncan
cvs-admin at zope.org
Thu Nov 6 17:11:54 EST 2003
Update of /cvs-repository/Products/QueueCatalog/tests
In directory cvs.zope.org:/tmp/cvs-serv3290/tests
Modified Files:
test_QueueCatalog.py
Log Message:
Add uidForObject hook which allows the underlying catalog to specify uids for new objects being indexed. If this hook is not implemented, uids are abs paths as before.
=== Products/QueueCatalog/tests/test_QueueCatalog.py 1.1 => 1.2 ===
--- Products/QueueCatalog/tests/test_QueueCatalog.py:1.1 Wed Jun 18 15:37:30 2003
+++ Products/QueueCatalog/tests/test_QueueCatalog.py Thu Nov 6 17:11:52 2003
@@ -106,7 +106,13 @@
self.assertEqual(len(info), 2)
self.assert_({'id': 'id', 'meta_type': 'FieldIndex'} in info)
self.assert_({'id': 'meta_type', 'meta_type': 'FieldIndex'} in info)
-
+
+
+ def testRealCatSpecifiesUids(self):
+ def stupidUidMaker(self, obj):
+ return '/stupid/uid'
+ ZCatalog.uidForObject = stupidUidMaker # monkey patch
+ self.assertEqual(self.app.queue_cat.uidForObject(None), '/stupid/uid')
# Enable this test when DemoStorage supports conflict resolution.
More information about the Zope-CVS
mailing list