def test_recursive_get_config_param(monkeypatch, tmp_path): ''' Test loading a config param present in a parent profile ''' monkeypatch.setenv('HOME', str(tmp_path)) init_tmpdir(tmp_path, 'expired') from awsmfav2.cli import CLI cli = CLI() mfa_serial = CLI.recursive_get_config_param(cli.config, 'profile role', 'mfa_serial') assert (mfa_serial == EXPECTED_MFA_DEV_ARN)
def test_recursive_get_config_param(monkeypatch, tmp_path): """ Test loading a config param present in a parent profile """ monkeypatch.setenv("HOME", str(tmp_path)) init_tmpdir(tmp_path, "expired") from awsmfav2.cli import CLI cli = CLI() mfa_serial = CLI.recursive_get_config_param(cli.config, "profile role", "mfa_serial") assert mfa_serial == EXPECTED_MFA_DEV_ARN