From 767d77a33a25e361bec7546b67a465dbb625ee57 Mon Sep 17 00:00:00 2001 From: Ivan Tyagov <ivan@nexedi.com> Date: Fri, 1 Jun 2012 12:10:31 +0300 Subject: [PATCH] Adjust test to recent changes in discussions (by default forum is public). --- product/ERP5/tests/testERP5Discussion.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/product/ERP5/tests/testERP5Discussion.py b/product/ERP5/tests/testERP5Discussion.py index 85b1a630da..0b3a6cbb58 100644 --- a/product/ERP5/tests/testERP5Discussion.py +++ b/product/ERP5/tests/testERP5Discussion.py @@ -127,14 +127,19 @@ class TestERP5Discussion(ERP5TypeTestCase): self.assertEqual(group1, discussion_thread_object1.getGroupValue()) self.assertEqual(group2, discussion_thread_object2.getGroupValue()) - # check getDocumentValue.. on Web Section context + # check getDocumentValue.. on Web Section context (by default forum is public + # so threads should be part of document list) + self.assertSameSet([discussion_thread_object1], [x.getObject() for x in web_section1.getDocumentValueList()]) + self.assertSameSet([discussion_thread_object2], [x.getObject() for x in web_section2.getDocumentValueList()]) + + # test archiving threads so the do not belong any more to web section document list + discussion_thread_object1.archive() + discussion_thread_object2.archive() + self.tic() + self.assertSameSet([], web_section1.getDocumentValueList()) self.assertSameSet([], web_section2.getDocumentValueList()) - discussion_thread_object1.publish() - discussion_thread_object2.publish() - self.tic() - self.assertSameSet([discussion_thread_object1], [x.getObject() for x in web_section1.getDocumentValueList()]) - self.assertSameSet([discussion_thread_object2], [x.getObject() for x in web_section2.getDocumentValueList()]) + def test_suite(): suite = unittest.TestSuite() -- 2.30.9