예제 #1
0
 def test_wrong_get_by_name(self):
     self.client.call = Mock(return_value=self.xml)
     pool = oca.VirtualMachinePool(self.client)
     pool.info()
     pool.get_by_name('wrong-vm-name')
예제 #2
0
 def test_get_by_name(self):
     self.client.call = Mock(return_value=self.xml)
     pool = oca.VirtualMachinePool(self.client)
     pool.info()
     assert pool.get_by_name('vm-in').name == 'vm-in'
예제 #3
0
 def test_wrong_get_by_id(self):
     self.client.call = Mock(return_value=self.xml)
     pool = oca.VirtualMachinePool(self.client)
     pool.info()
     pool.get_by_id(1010011010)
예제 #4
0
 def test_vm_pool_info(self):
     self.client.call = Mock(return_value=self.xml)
     pool = oca.VirtualMachinePool(self.client)
     pool.info()
     assert len(list(pool)) == 3
예제 #5
0
 def test_get_by_id(self):
     self.client.call = Mock(return_value=self.xml)
     pool = oca.VirtualMachinePool(self.client)
     pool.info()
     assert pool.get_by_id(8).id == 8
 def test_wrong_get_by_name(self):
     self.client.call = Mock(return_value=self.xml)
     pool = oca.VirtualMachinePool(self.client)
     pool.info()
     pool.get_by_name('wrong-vm-name')
 def test_wrong_get_by_id(self):
     self.client.call = Mock(return_value=self.xml)
     pool = oca.VirtualMachinePool(self.client)
     pool.info()
     pool.get_by_id(1010011010)
 def test_get_by_name(self):
     self.client.call = Mock(return_value=self.xml)
     pool = oca.VirtualMachinePool(self.client)
     pool.info()
     assert  pool.get_by_name('vm-in').name == 'vm-in'
 def test_get_by_id(self):
     self.client.call = Mock(return_value=self.xml)
     pool = oca.VirtualMachinePool(self.client)
     pool.info()
     assert  pool.get_by_id(8).id == 8
 def test_vm_pool_info(self):
     self.client.call = Mock(return_value=self.xml)
     pool = oca.VirtualMachinePool(self.client)
     pool.info()
     assert len(list(pool)) == 3