Commit b89148e0 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

testKM: commit transaction right after ERP5Site_addNewKnowledgePad().

ERP5Site_addNewKnowledgePad() immediately reindexes added knowledge pad, but it cannot be fetched from existing another REPEATABLE-READ transaction.
parent a50d64c7
...@@ -105,6 +105,7 @@ class TestKM(TestKMMixIn): ...@@ -105,6 +105,7 @@ class TestKM(TestKMMixIn):
web_front_knowledge_pad_relative_url = self.website.ERP5Site_addNewKnowledgePad( \ web_front_knowledge_pad_relative_url = self.website.ERP5Site_addNewKnowledgePad( \
pad_title = 'Web Front Knowledge Pad', \ pad_title = 'Web Front Knowledge Pad', \
mode='web_front') mode='web_front')
self.commit()
self.web_front_knowledge_pad = portal.restrictedTraverse( self.web_front_knowledge_pad = portal.restrictedTraverse(
web_front_knowledge_pad_relative_url) web_front_knowledge_pad_relative_url)
self.base_url_pattern = '%s/%s?parent_web_section_url=%s&box_relative_url=%s&is_gadget_mode=1' self.base_url_pattern = '%s/%s?parent_web_section_url=%s&box_relative_url=%s&is_gadget_mode=1'
...@@ -113,12 +114,14 @@ class TestKM(TestKMMixIn): ...@@ -113,12 +114,14 @@ class TestKM(TestKMMixIn):
web_section_knowledge_pad_relative_url = self.websection.ERP5Site_addNewKnowledgePad( \ web_section_knowledge_pad_relative_url = self.websection.ERP5Site_addNewKnowledgePad( \
pad_title = 'Web Section Knowledge Pad', \ pad_title = 'Web Section Knowledge Pad', \
mode = 'web_section') mode = 'web_section')
self.commit()
self.web_section_knowledge_pad = portal.restrictedTraverse( self.web_section_knowledge_pad = portal.restrictedTraverse(
web_section_knowledge_pad_relative_url) web_section_knowledge_pad_relative_url)
# Web Section Content Pad # Web Section Content Pad
self.web_section_content_knowledge_pad_relative_url = self.webpage.ERP5Site_addNewKnowledgePad( self.web_section_content_knowledge_pad_relative_url = self.webpage.ERP5Site_addNewKnowledgePad(
pad_title = 'Web Section Knowledge Pad', \ pad_title = 'Web Section Knowledge Pad', \
mode = 'web_section') mode = 'web_section')
self.commit()
self.web_section_content_knowledge_pad = portal.restrictedTraverse( self.web_section_content_knowledge_pad = portal.restrictedTraverse(
self.web_section_content_knowledge_pad_relative_url) self.web_section_content_knowledge_pad_relative_url)
self.web_front_knowledge_pad.visible() self.web_front_knowledge_pad.visible()
......
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