Commit 5f46d123 authored by Romain Courteaud's avatar Romain Courteaud

slapos_accounting: drop testSlapOSContractAlarm

parent f65dfb12
# Copyright (c) 2013 Nexedi SA and Contributors. All Rights Reserved.
from erp5.component.test.SlapOSTestCaseMixin import SlapOSTestCaseMixin
class TestSlapOSRequestValidationPayment(SlapOSTestCaseMixin):
def test_alarm_software_instance_unallocated(self):
self._makeTree()
preference = self.portal.portal_preferences.getActiveSystemPreference()
preference.setPreferredCloudContractEnabled(True)
self.tic()
script_name = "SoftwareInstance_requestValidationPayment"
alarm = self.portal.portal_alarms.slapos_contract_request_validation_payment
self._test_alarm(
alarm, self.software_instance, script_name)
def test_alarm_slave_instance_unallocated(self):
self._makeSlaveTree()
preference = self.portal.portal_preferences.getActiveSystemPreference()
preference.setPreferredCloudContractEnabled(True)
self.tic()
script_name = "SoftwareInstance_requestValidationPayment"
alarm = self.portal.portal_alarms.slapos_contract_request_validation_payment
self._test_alarm(
alarm, self.software_instance, script_name)
def test_alarm_software_instance_unallocated_disable_cloud_contract(self):
self._makeTree()
preference = self.portal.portal_preferences.getActiveSystemPreference()
preference.setPreferredCloudContractEnabled(False)
self.tic()
script_name = "SoftwareInstance_requestValidationPayment"
alarm = self.portal.portal_alarms.slapos_contract_request_validation_payment
self._test_alarm_not_visited(
alarm, self.software_instance, script_name)
def test_alarm_slave_instance_unallocated_disable_cloud_contract(self):
self._makeSlaveTree()
preference = self.portal.portal_preferences.getActiveSystemPreference()
preference.setPreferredCloudContractEnabled(False)
self.tic()
script_name = "SoftwareInstance_requestValidationPayment"
alarm = self.portal.portal_alarms.slapos_contract_request_validation_payment
self._test_alarm_not_visited(
alarm, self.software_instance, script_name)
def test_alarm_software_instance_allocated(self):
self._makeTree()
preference = self.portal.portal_preferences.getActiveSystemPreference()
preference.setPreferredCloudContractEnabled(True)
self.tic()
self._makeComputeNode()
self.software_instance.setAggregate(self.partition.getRelativeUrl())
self.tic()
script_name = "SoftwareInstance_requestValidationPayment"
alarm = self.portal.portal_alarms.slapos_contract_request_validation_payment
self._test_alarm_not_visited(
alarm, self.software_instance, script_name)
def test_alarm_slave_instance_allocated(self):
self._makeSlaveTree()
preference = self.portal.portal_preferences.getActiveSystemPreference()
preference.setPreferredCloudContractEnabled(True)
self.tic()
self._makeComputeNode()
self.software_instance.setAggregate(self.partition.getRelativeUrl())
self.tic()
script_name = "SoftwareInstance_requestValidationPayment"
alarm = self.portal.portal_alarms.slapos_contract_request_validation_payment
self._test_alarm_not_visited(
alarm, self.software_instance, script_name)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSContractAlarm</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSContractAlarm</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
test.erp5.testSlapOSConsumptionSkins
test.erp5.testSlapOSSaleSupply
test.erp5.testSlapOSAccountingConstraint
test.erp5.testSlapOSAccountingRule
test.erp5.testSlapOSAccountingAlarm
test.erp5.testSlapOSAccountingBuilder
test.erp5.testSlapOSContractSkins
test.erp5.testSlapOSAccountingConstraint
test.erp5.testSlapOSAccountingInteractionWorkflow
test.erp5.testSlapOSAccountingRule
test.erp5.testSlapOSAccountingSkins
test.erp5.testSlapOSAccountingAlarm
test.erp5.testSlapOSContractAlarm
test.erp5.testSlapOSConsumptionSkins
test.erp5.testSlapOSContractSkins
test.erp5.testSlapOSEntityCreatePayment
test.erp5.testSlapOSSaleSupply
\ 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