Пример #1
0
def test_get_provider__none():
    config = get_config("""
    [domain/local]
    """)
    library = SSSDFactsLibrary(config)

    assert library.get_provider("local", "id_provider") is None
Пример #2
0
def test_get_provider__without_fallback():
    config = get_config("""
    [domain/local]
    id_provider = local
    """)
    library = SSSDFactsLibrary(config)

    assert library.get_provider("local", "id_provider") == "local"
Пример #3
0
def test_get_provider__with_fallback():
    config = get_config("""
    [domain/ldap]
    id_provider = ldap
    """)
    library = SSSDFactsLibrary(config)

    assert library.get_provider("ldap", "sudo_provider",
                                ["id_provider"]) == "ldap"