'Tests to make sure we only log a warning when we do not find a
compute node on startup since this may be expected.'

@mock.patch.object(objects.ComputeNodeList, 'get_all_by_host', side_effect=exception.NotFound)
@mock.patch('nova.compute.manager.LOG')
def test_get_compute_nodes_in_db_on_startup(self, mock_log, get_all_by_host):

    self.assertEqual([], self.compute._get_compute_nodes_in_db(self.context, startup=True))
    get_all_by_host.assert_called_once_with(self.context, self.compute.host, use_slave=False)
    self.assertTrue(mock_log.warning.called)
    self.assertFalse(mock_log.error.called)
