Commit ef3f94ae authored by Łukasz Nowak's avatar Łukasz Nowak

Add site configuration dump test.

parent fb2ed293
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2012 Nexedi SA and Contributors. All Rights Reserved.
#
##############################################################################
from Products.SlapOS.tests.testSlapOSMixin import \
testSlapOSMixin
import os
from Testing import ZopeTestCase
class TestSlapOSDump(testSlapOSMixin):
def write(self, name, output):
path = os.path.join(os.environ['INSTANCE_HOME'], name)
with open(path, 'w') as f:
f.write(output)
return path
def test(self):
for dump in [
'ERP5Site_dumpAlarmToolConfiguration',
'ERP5Site_dumpBuilderList',
'ERP5Site_dumpPortalTypeActionList',
'ERP5Site_dumpPortalTypeList',
'ERP5Site_dumpPortalTypeRoleList',
'ERP5Site_dumpPropertySheetList',
'ERP5Site_dumpRuleTesterList',
'ERP5Site_dumpSkinProperty',
'ERP5Site_dumpWorkflowChain'
]:
ZopeTestCase._print('\n')
try:
location = self.write('%s.txt' % dump, getattr(self.portal, dump)())
except Exception:
ZopeTestCase._print('Problem with %s\n' % dump)
else:
ZopeTestCase._print('Stored dump %s in %s\n' % (dump, location))
123
\ No newline at end of file
124
\ No newline at end of file
testSlapOSERP5Alarm
testSlapOSERP5DefaultScenario
testSlapOSERP5GroupRoleSecurity
testSlapOSERP5LocalPermissionSlapOSInteractionWorkflow
testSlapOSERP5SiteDump
testSlapOSERP5SkinSelection
testSlapOSERP5Alarm
\ No newline at end of file
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