Commit 4ab68161 authored by Vincent Pelletier's avatar Vincent Pelletier

Move comment, and add one.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25606 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c71090c8
...@@ -3766,20 +3766,22 @@ VALUES ...@@ -3766,20 +3766,22 @@ VALUES
ZopeTestCase._print('\n%s ' % message) ZopeTestCase._print('\n%s ' % message)
LOG('Testing... ',0,message) LOG('Testing... ',0,message)
# Create some dummy documents
def doCatalog(catalog, document): def doCatalog(catalog, document):
catalog.catalogObjectList([document], check_uid=0) catalog.catalogObjectList([document], check_uid=0)
result = catalog(select_expression='reference', uid=document.getUid()) result = catalog(select_expression='reference', uid=document.getUid())
self.assertEqual(len(result), 1) self.assertEqual(len(result), 1)
return result[0].reference return result[0].reference
# Create some dummy documents
portal = self.getPortalObject() portal = self.getPortalObject()
portal.foo = FooDocument() portal.foo = FooDocument()
portal.bar = BarDocument() portal.bar = BarDocument()
# Get instances, wrapping them in acquisition context implicitely. # Get instances, wrapping them in acquisition context implicitely.
foo = portal.foo foo = portal.foo
bar = portal.bar bar = portal.bar
# Consistency checks
self.assertTrue(getattr(foo, 'getReference', None) is not None) self.assertTrue(getattr(foo, 'getReference', None) is not None)
self.assertTrue(getattr(bar, 'getReference', None) is None) self.assertTrue(getattr(bar, 'getReference', None) is None)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment