def test_get_libvirt_domain_not_found(self):
self.fake_connection.lookupByName.side_effect = libvirt.libvirtError(
'boom')
self.assertRaises(exception.DomainNotFound, utils.get_libvirt_domain,
self.fake_connection, 'Fred')
self.fake_connection.lookupByName.assert_called_once_with('Fred')
评论列表
文章目录