def test_get_provider__none(): config = get_config(""" [domain/local] """) library = SSSDFactsLibrary(config) assert library.get_provider("local", "id_provider") is None
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"
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"