def setUp(self): super(FailoverSegmentAPITestCase, self).setUp() self.segment_api = ha_api.FailoverSegmentAPI() self.req = fakes.HTTPRequest.blank('/v1/segments', use_admin_context=True) self.context = self.req.environ['masakari.context'] self.failover_segment = fakes_data.create_fake_failover_segment( name="segment1", id=1, description="something", service_type="COMPUTE", recovery_method="auto", uuid=uuidsentinel.fake_segment)
def __init__(self): self.api = segment_api.FailoverSegmentAPI()