'Test for compute service get right availability zone.'

def test_set_availability_zone_compute_service(self):

    service = self._create_service_with_topic('compute', self.host)
    services = db.service_get_all(self.context)
    new_service = az.set_availability_zones(self.context, services)[0]
    self.assertEqual(self.default_az, new_service['availability_zone'])
    self._add_to_aggregate(service, self.agg)
    new_service = az.set_availability_zones(self.context, services)[0]
    self.assertEqual(self.availability_zone, new_service['availability_zone'])
    self._destroy_service(service)
