Commit eec43006 authored by Ivan Tyagov's avatar Ivan Tyagov

test new thread reference do no overlap any other traversable object.

parent 9d7f2574
No related merge requests found
...@@ -186,6 +186,18 @@ class TestERP5Discussion(ERP5TypeTestCase): ...@@ -186,6 +186,18 @@ class TestERP5Discussion(ERP5TypeTestCase):
self.assertSameSet([], web_section1.getDocumentValueList()) self.assertSameSet([], web_section1.getDocumentValueList())
self.assertSameSet([], web_section2.getDocumentValueList()) self.assertSameSet([], web_section2.getDocumentValueList())
# test new thread reference do no overlap any other traversable object
web_section1.WebSection_createNewDiscussionThread(web_section1.getId(), 'test reference using web section')
web_section1.WebSection_createNewDiscussionThread('image_module', 'test1 body')
self.tic()
self.assertNotEqual(web_section1.getId(),
portal.portal_catalog.getResultValue(
portal_type = 'Discussion Thread',
title = web_section1.getId()).getReference())
self.assertNotEqual('image_module',
portal.portal_catalog.getResultValue(
portal_type = 'Discussion Thread',
title = 'image_module').getReference())
def test_02_ReferenceGenerationFromString(self): def test_02_ReferenceGenerationFromString(self):
s = "a test by ivan !@#$%^&*()[]\\é" s = "a test by ivan !@#$%^&*()[]\\é"
......
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