예제 #1
0
 def test_missing_key(self):
     assert u.get_ldap_value({}, 'key') is None
예제 #2
0
 def test_none(self):
     data = {'key': None}
     assert u.get_ldap_value(data, 'key') is None
예제 #3
0
 def test_empty_list(self):
     data = {'key': []}
     assert u.get_ldap_value(data, 'key') is None
예제 #4
0
 def test_multiple_values_in_list(self, value):
     data = {'key': [value, 'KO']}
     assert u.get_ldap_value(data, 'key') == value
예제 #5
0
 def test_single_value_in_list(self, value):
     data = {'key': [value]}
     assert u.get_ldap_value(data, 'key') == value
예제 #6
0
 def test_single_value(self, value):
     data = {'key': value}
     assert u.get_ldap_value(data, 'key') == value