Commit 5b852bb3 authored by Ivan Tyagov's avatar Ivan Tyagov

Add testing for not index (yet ) discussion posts to be show under a

discussion thread view using passed from request new unindex discussion
post url.
parent acca4efd
......@@ -93,10 +93,19 @@ class TestERP5Discussion(ERP5TypeTestCase):
def test_02_createDiscussionPost(self):
"""Create a disucssion post inside a discussion thread"""
thread = self.stepCreateThread();
post = self.stepCreatePost(thread);
thread = self.stepCreateThread()
post = self.stepCreatePost(thread)
# post is not indexed yet
self.assertSameSet([], thread.DiscussionThread_getDiscussionPostList())
# not indexed but its relative url is passed through REQUEST
self.app.REQUEST.set('post_relative_url', post.getRelativeUrl())
self.assertSameSet([post], thread.DiscussionThread_getDiscussionPostList())
self.tic()
# indexed already
self.assertSameSet([post], thread.DiscussionThread_getDiscussionPostList())
def test_MultipleForum(self):
"""
Test multiple forums may exists within same ERP5 Web Site.
......
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