def test_constructor(self, load_auth_mock, ks_sess_mock): placement_client.SchedulerReportClient() load_auth_mock.assert_called_once_with(cfg.CONF, 'placement') ks_sess_mock.assert_called_once_with(auth=load_auth_mock.return_value, cert=None, timeout=None, verify=True)
def setUp(self): super(PlacementAPIClientTestCase, self).setUp() self.mock_load_auth_p = mock.patch( 'keystoneauth1.loading.load_auth_from_conf_options') self.mock_load_auth = self.mock_load_auth_p.start() self.mock_request_p = mock.patch( 'keystoneauth1.session.Session.request') self.mock_request = self.mock_request_p.start() self.client = placement_client.SchedulerReportClient()