Commit 99ab8293 authored by Romain Courteaud's avatar Romain Courteaud

slapos_panel_ui_test: add basic payable service test

parent 0171793c
...@@ -6,7 +6,7 @@ from AccessControl.SecurityManagement import newSecurityManager ...@@ -6,7 +6,7 @@ from AccessControl.SecurityManagement import newSecurityManager
def ERP5Site_bootstrapSlapOSPanelTest(self, scenario): def ERP5Site_bootstrapSlapOSPanelTest(self, scenario):
if scenario not in ['customer', 'customer_shared']: if scenario not in ['accounting', 'customer', 'customer_shared']:
raise ValueError('Unsupported bootstrap scenario: %s' % scenario) raise ValueError('Unsupported bootstrap scenario: %s' % scenario)
portal = self.getPortalObject() portal = self.getPortalObject()
...@@ -14,10 +14,19 @@ def ERP5Site_bootstrapSlapOSPanelTest(self, scenario): ...@@ -14,10 +14,19 @@ def ERP5Site_bootstrapSlapOSPanelTest(self, scenario):
try: try:
newSecurityManager(None, portal.acl_users.getUser(SUPER_USER)) newSecurityManager(None, portal.acl_users.getUser(SUPER_USER))
if scenario == 'accounting':
organisation = portal.organisation_module.newContent(
portal_type="Organisation",
title="Test accounting organisation"
)
else:
organisation = None
# Create Project # Create Project
project = portal.project_module.newContent( project = portal.project_module.newContent(
portal_type="Project", portal_type="Project",
title='Test Project' title='Test Project',
destination_section_value=organisation
) )
project.validate() project.validate()
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testAccountingScenario</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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