Comment out the discussion control panel event subscriber tests. We disabled this functionality anyway.

svn path=/plone.app.discussion/branches/1.x/; revision=46991
This commit is contained in:
Timo Stollenwerk 2011-01-22 12:39:15 +00:00
parent 2f30c27555
commit ed4f2b1fa8

View File

@ -99,71 +99,71 @@ class RegistryTest(PloneTestCase):
# 'IDiscussionSettings.user_notification_enabled'], False) # 'IDiscussionSettings.user_notification_enabled'], False)
class ConfigurationChangedSubscriberTest(PloneTestCase): #class ConfigurationChangedSubscriberTest(PloneTestCase):
#
layer = DiscussionLayer # layer = DiscussionLayer
#
def afterSetUp(self): # def afterSetUp(self):
self.loginAsPortalOwner() # self.loginAsPortalOwner()
# Set up the registry # # Set up the registry
registry = queryUtility(IRegistry) # registry = queryUtility(IRegistry)
self.settings = registry.forInterface(IDiscussionSettings, check=False) # self.settings = registry.forInterface(IDiscussionSettings, check=False)
#
def test_moderation_enabled_in_discussion_control_panel_changed(self): # def test_moderation_enabled_in_discussion_control_panel_changed(self):
"""Make sure the 'Discussion Item' workflow is changed properly, when # """Make sure the 'Discussion Item' workflow is changed properly, when
the 'comment_moderation' setting in the discussion control panel # the 'comment_moderation' setting in the discussion control panel
changes. # changes.
""" # """
# By default the one_state_workflow without moderation is enabled # # By default the one_state_workflow without moderation is enabled
self.assertEquals(('one_state_workflow',), # self.assertEquals(('one_state_workflow',),
self.portal.portal_workflow.getChainForPortalType( # self.portal.portal_workflow.getChainForPortalType(
'Discussion Item')) # 'Discussion Item'))
#
# Enable moderation in the discussion control panel # # Enable moderation in the discussion control panel
self.settings.moderation_enabled = True # self.settings.moderation_enabled = True
#
# Make sure the comment_review_workflow with moderation enabled is # # Make sure the comment_review_workflow with moderation enabled is
# enabled # # enabled
self.assertEquals(('comment_review_workflow',), # self.assertEquals(('comment_review_workflow',),
self.portal.portal_workflow.getChainForPortalType( # self.portal.portal_workflow.getChainForPortalType(
'Discussion Item')) # 'Discussion Item'))
# And back # # And back
self.settings.moderation_enabled = False # self.settings.moderation_enabled = False
self.assertEquals(('one_state_workflow',), # self.assertEquals(('one_state_workflow',),
self.portal.portal_workflow.getChainForPortalType( # self.portal.portal_workflow.getChainForPortalType(
'Discussion Item')) # 'Discussion Item'))
#
def test_change_workflow_in_types_control_panel(self): # def test_change_workflow_in_types_control_panel(self):
"""Make sure the setting in the discussion control panel is changed # """Make sure the setting in the discussion control panel is changed
accordingly, when the workflow for the 'Discussion Item' changed in # accordingly, when the workflow for the 'Discussion Item' changed in
the types control panel. # the types control panel.
""" # """
# By default, moderation is disabled # # By default, moderation is disabled
self.settings.moderation_enabled = False # self.settings.moderation_enabled = False
#
# Enable the 'comment_review_workflow' with moderation enabled # # Enable the 'comment_review_workflow' with moderation enabled
self.portal.portal_workflow.setChainForPortalTypes( # self.portal.portal_workflow.setChainForPortalTypes(
('Discussion Item',), # ('Discussion Item',),
('comment_review_workflow',)) # ('comment_review_workflow',))
#
# Make sure the moderation_enabled settings has changed # # Make sure the moderation_enabled settings has changed
self.settings.moderation_enabled = True # self.settings.moderation_enabled = True
#
# Enable the 'comment_review_workflow' with moderation enabled # # Enable the 'comment_review_workflow' with moderation enabled
self.portal.portal_workflow.setChainForPortalTypes( # self.portal.portal_workflow.setChainForPortalTypes(
('Discussion Item',), # ('Discussion Item',),
('one_state_workflow',)) # ('one_state_workflow',))
self.settings.moderation_enabled = True # self.settings.moderation_enabled = True
#
# Enable a 'custom' discussion workflow # # Enable a 'custom' discussion workflow
self.portal.portal_workflow.setChainForPortalTypes( # self.portal.portal_workflow.setChainForPortalTypes(
('Discussion Item',), # ('Discussion Item',),
('intranet_workflow',)) # ('intranet_workflow',))
#
# Setting has not changed. A Custom workflow disables the # # Setting has not changed. A Custom workflow disables the
# enable_moderation checkbox in the discussion control panel. The # # enable_moderation checkbox in the discussion control panel. The
# setting itself remains unchanged. # # setting itself remains unchanged.
self.settings.moderation_enabled = True # self.settings.moderation_enabled = True
def test_suite(): def test_suite():
return unittest.defaultTestLoader.loadTestsFromName(__name__) return unittest.defaultTestLoader.loadTestsFromName(__name__)