def setUp(self): save_conf = client.BaseClient._configure_manager client.BaseClient._configure_manager = Mock() self.client = client.BaseClient() client.BaseClient._configure_manager = save_conf self.client._manager = fakes.FakeManager() self.id_svc = pyrax.identity
def test_base_client(self): tenant_id = "faketenantid" auth_url = "fakeauthurl" region_name = "fakeregion" endpoint_type = "fakeenpointtype" management_url = "fakemanagementurl" auth_token = "fakeauthtoken" service_name = "fakeservicename" timings = "faketimings" no_cache = "fakenocache" http_log_debug = "fakehttplogdebug" timeout = "faketimeout" auth_system = "fakeauthsystem" save_conf = client.BaseClient._configure_manager client.BaseClient._configure_manager = Mock() bc = client.BaseClient( identity=self.identity, region_name=region_name, endpoint_type=endpoint_type, management_url=management_url, service_name=service_name, timings=timings, http_log_debug=http_log_debug, timeout=timeout, ) self.assertEqual(bc.region_name, region_name) self.assertEqual(bc.endpoint_type, endpoint_type) self.assertEqual(bc.management_url, management_url) self.assertEqual(bc.service_name, service_name) self.assertEqual(bc.timings, timings) self.assertEqual(bc.http_log_debug, http_log_debug) self.assertEqual(bc.timeout, timeout) client.BaseClient._configure_manager = save_conf