# Path: tests/functional/ucare_cli/helpers.py
# def arg_namespace(arguments_str):
#     return ucare_argparser().parse_args(arguments_str.split())
# 
# Path: pyuploadcare/ucare_cli/settings.py
# def load_config(  # noqa: C901
#     arg_namespace: Optional[argparse.Namespace] = None,
#     config_file_names: Optional[List[str]] = None,
# ) -> Dict[str, Any]:
#     conf: Dict[str, Any] = {}
# 
#     if config_file_names:
#         for file_name in config_file_names:
#             conf = load_config_from_file(file_name, conf)
# 
#     if arg_namespace:
#         conf = load_config_from_args(arg_namespace, conf)
# 
#     client_conf = {}
#     for key, value in conf.items():
#         if key in client_setting_mapping:
#             key = client_setting_mapping[key]
#         client_conf[key] = value
# 
#     return client_conf


from tests.functional.ucare_cli.helpers import arg_namespace
from pyuploadcare.ucare_cli.settings import load_config



def test_change_pub_key():
    conf = load_config(arg_namespace("--pub_key demopublickey list_files"))

    assert conf["public_key"] == "demopublickey"


def test_change_secret():
    conf = load_config(arg_namespace("--secret demosecretkey list_files"))

    assert conf["secret_key"] == "demosecretkey"


def test_change_api_base():
    conf = load_config(

# Path: tests/functional/ucare_cli/helpers.py
# def arg_namespace(arguments_str):
#     return ucare_argparser().parse_args(arguments_str.split())
# 
# Path: pyuploadcare/ucare_cli/settings.py
# def load_config(  # noqa: C901
#     arg_namespace: Optional[argparse.Namespace] = None,
#     config_file_names: Optional[List[str]] = None,
# ) -> Dict[str, Any]:
#     conf: Dict[str, Any] = {}
# 
#     if config_file_names:
#         for file_name in config_file_names:
#             conf = load_config_from_file(file_name, conf)
# 
#     if arg_namespace:
#         conf = load_config_from_args(arg_namespace, conf)
# 
#     client_conf = {}
#     for key, value in conf.items():
#         if key in client_setting_mapping:
#             key = client_setting_mapping[key]
#         client_conf[key] = value
# 
#     return client_conf


# Path: tests/functional/ucare_cli/test_args.py
from tests.functional.ucare_cli.helpers import arg_namespace
from pyuploadcare.ucare_cli.settings import load_config




def test_change_pub_key():
    conf = load_config(arg_namespace("--pub_key demopublickey list_files"))

    assert conf["public_key"] == "demopublickey"


def test_change_secret():
    conf = load_config(arg_namespace("--secret demosecretkey list_files"))

    assert conf["secret_key"] == "demosecretkey"


def test_change_api_base():
    conf = load_config(

        arg_namespace("--api_base https://uploadcare.com/api/ list_files")