def perf_client(client, mocker): perf_client = PerformancePlatformClient() current_app = mocker.Mock( config={ "PERFORMANCE_PLATFORM_ENABLED": True, "PERFORMANCE_PLATFORM_ENDPOINTS": {"foo": "my_token", "bar": "other_token"}, "PERFORMANCE_PLATFORM_URL": "https://performance-platform-url/", } ) perf_client.init_app(current_app) return perf_client
def perf_client(client, mocker): perf_client = PerformancePlatformClient() current_app = mocker.Mock( config={ 'PERFORMANCE_PLATFORM_ENABLED': True, 'PERFORMANCE_PLATFORM_ENDPOINTS': { 'foo': 'my_token', 'bar': 'other_token' }, 'PERFORMANCE_PLATFORM_URL': 'https://performance-platform-url/' }) perf_client.init_app(current_app) return perf_client