def test_missing_key(self): assert u.get_ldap_value({}, 'key') is None
def test_none(self): data = {'key': None} assert u.get_ldap_value(data, 'key') is None
def test_empty_list(self): data = {'key': []} assert u.get_ldap_value(data, 'key') is None
def test_multiple_values_in_list(self, value): data = {'key': [value, 'KO']} assert u.get_ldap_value(data, 'key') == value
def test_single_value_in_list(self, value): data = {'key': [value]} assert u.get_ldap_value(data, 'key') == value
def test_single_value(self, value): data = {'key': value} assert u.get_ldap_value(data, 'key') == value