def test_wrong_get_by_name(self):
     self.client.call = Mock(return_value=self.xml)
     pool = VirtualMachinePool(self.client)
     pool.info()
     pool.get_by_name('wrong-vm-name')
 def test_get_by_name(self):
     self.client.call = Mock(return_value=self.xml)
     pool = VirtualMachinePool(self.client)
     pool.info()
     assert  pool.get_by_name('vm-in').name == 'vm-in'