def setUpClass(cls): # create a configured API client cls.secrets = CredentialsSource.secrets_path() cls.os_environ_dict_str = 'os.environ' cls.source_config_details, cls.config_keys = CredentialsSource.fetch_credentials( ), CredentialsSource.fetch_config_keys() cls.pat_token = CredentialsSource.fetch_pat()
import unittest from unittest.mock import patch import inspect from lusid import ApiConfigurationLoader from lusid.utilities.api_configuration import ApiConfiguration from lusid.utilities.proxy_config import ProxyConfig from utilities import CredentialsSource from utilities.temp_file_manager import TempFileManager source_config_details, config_keys = CredentialsSource.fetch_credentials( ), CredentialsSource.fetch_config_keys() class ApiConfigurationLoaderTests(unittest.TestCase): """ These test ensure that the ApiConfigurationLoader works as expected """ OS_ENVIRON = "os_environ" def assert_config_values(self, config, secrets): """ Not a test. This is used to test the values of the ApiConfiguration. :param lusid.utilities.ApiConfiguration config: The ApiConfiguration to test the values of :param dict secrets: A dictionary with the secrets using a common addressing scheme for both environment variables and secret file variables