def setUp(self): super(BuildInfoManagerTest, self).setUp() self.client = mock.Mock() self.client.get.return_value = fakes.FakeHTTPResponse( 200, None, {'content-type': 'application/json'}, jsonutils.dumps('body')) self.manager = build_info.BuildInfoManager(self.client)
def __init__(self, *args, **kwargs): """Initialize a new client for the Heat v1 API.""" self.http_client = http._construct_http_client(*args, **kwargs) self.stacks = stacks.StackManager(self.http_client) self.resources = resources.ResourceManager(self.http_client) self.resource_types = resource_types.ResourceTypeManager( self.http_client) self.events = events.EventManager(self.http_client) self.actions = actions.ActionManager(self.http_client) self.build_info = build_info.BuildInfoManager(self.http_client) self.software_deployments = \ software_deployments.SoftwareDeploymentManager( self.http_client) self.software_configs = software_configs.SoftwareConfigManager( self.http_client)
def setUp(self): super(BuildInfoManagerTest, self).setUp() self.client = mock.Mock() self.client.json_request.return_value = ('resp', 'body') self.manager = build_info.BuildInfoManager(self.client)