def testKeys(self):
        client = LDAPClientTestDriver()
        o=ldapsyntax.LDAPEntry(client=client,
                               dn='cn=foo,dc=example,dc=com',
                               attributes={
            'objectClass': ['a', 'b'],
            'aValue': ['a'],
            'bValue': ['b'],
            })
        seen={}
        for k in o.keys():
            assert not seen.has_key(k)
            seen[k]=1
        assert seen == {'objectClass': 1,
                        'aValue': 1,
                        'bValue': 1,
                        }
Iterating over the keys of an LDAP object gives expected results.
dataset/ETHPy150Open twisted/ldaptor/ldaptor/test/test_ldapsyntax.py/LDAPSyntaxBasics.testKeys