예제 #1
0
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)
예제 #2
0
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