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

Test instance.allocatePartition

parent eb44da22
......@@ -82,3 +82,19 @@ class TestSlapOSCoreInstanceSlapInterfaceWorkflow(testSlapOSMixin):
comment))
self.assertEqual(count2+1, self._countInstanceBang(request_instance,
comment))
def test_allocatePartition_computer_partition_url_required(self):
self.login(self.instance.getReference())
self.assertRaises(TypeError, self.instance.allocatePartition)
def test_allocatePartition(self):
computer = self.portal.computer_module.template_computer\
.Base_createCloneDocument(batch_mode=1)
computer.validate()
computer_partition = computer.newContent(portal_type='Computer Partition')
computer_partition.validate()
computer_partition.markFree()
computer_partition_url = computer_partition.getRelativeUrl()
self.instance.allocatePartition(
computer_partition_url=computer_partition_url)
self.assertEqual(self.instance.getAggregate(), computer_partition_url)
169
\ No newline at end of file
170
\ 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