Commit 37ea1e21 authored by Łukasz Nowak's avatar Łukasz Nowak

Cover new case.

parent e55e2619
......@@ -190,6 +190,15 @@ class TestSlapOSAllocation(testSlapOSMixin):
self.assertEqual(self.partition.getRelativeUrl(),
self.software_instance.getAggregate(portal_type='Computer Partition'))
def test_allocation_does_not_fail_on_instance_with_damaged_sla_xml(self):
self.software_instance.setSlaXml('this is not xml')
self.assertEqual(None, self.software_instance.getAggregateValue(
portal_type='Computer Partition'))
self.software_instance.SoftwareInstance_tryToAllocatePartition()
self.assertEqual(None, self.software_instance.getAggregateValue(
portal_type='Computer Partition'))
transaction.abort()
def _simulateSoftwareInstance_tryToAllocatePartition(self):
script_name = 'SoftwareInstance_tryToAllocatePartition'
if script_name in self.portal.portal_skins.custom.objectIds():
......
185
\ No newline at end of file
186
\ 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