def test_check_requested_destination_fails_when_destination_is_up(self):
    self.mox.StubOutWithMock(db, 'service_get_by_compute_host')
    db.service_get_by_compute_host(self.context, self.destination).AndRaise(exception.NotFound)
    self.mox.ReplayAll()
    self.assertRaises(exception.ComputeServiceUnavailable, self.task._check_requested_destination)
def test_check_requested_destination_fails_when_destination_is_up(self):
    self.mox.StubOutWithMock(db, 'service_get_by_compute_host')
    db.service_get_by_compute_host(self.context, self.destination).AndRaise(exception.NotFound)
    self.mox.ReplayAll()
    self.assertRaises(exception.ComputeServiceUnavailable, self.task._check_requested_destination)