'Tests that a 404 is returned if instance_get_all_by_host raises
HostMappingNotFound.'

def test_show_with_servers_host_mapping_not_found(self):

    hyper_id = self._get_hyper_id()
    req = self._get_request(use_admin_context=True, url=('/os-hypervisors/%s?with_servers=true' % hyper_id))
    with mock.patch.object(self.controller.host_api, 'instance_get_all_by_host', side_effect=exception.HostMappingNotFound(name=hyper_id)):
        self.assertRaises(exc.HTTPNotFound, self.controller.show, req, hyper_id)
