# Path: ldaptor/delta.py
# class Modification(attributeset.LDAPAttributeSet):
# class Add(Modification):
# class Delete(Modification):
# class Replace(Modification):
# class Operation(object):
# class ModifyOp(Operation):
# class AddOp(Operation):
# class DeleteOp(Operation):
#     def patch(self, entry):
#     def asLDAP(self):
#     def __eq__(self, other):
#     def patch(self, entry):
#     def asLDIF(self):
#     def patch(self, entry):
#     def asLDIF(self):
#     def patch(self, entry):
#     def asLDIF(self):
#     def patch(self, root):
#     def __init__(self, dn, modifications=[]):
#     def asLDIF(self):
#     def asLDAP(self):
#     def _getClassFromOp(class_, op):
#     def fromLDAP(class_, request):
#     def patch(self, root):
#         def gotEntry(entry, modifications):
#     def __repr__(self):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def __init__(self, entry):
#     def asLDIF(self):
#     def patch(self, root):
#         def gotParent(parent, entry):
#     def __repr__(self):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def __init__(self, dn):
#     def asLDIF(self):
#     def patch(self, root):
#         def gotEntry(entry):
#     def __repr__(self):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     _LDAP_OP = None
#     _LDAP_OP = 0
#     _LDAP_OP = 1
#     _LDAP_OP = 2
# 
# Path: ldaptor/entry.py
# def sshaDigest(passphrase, salt=None):
#     def __init__(self, dn, attributes={}):
#     def buildAttributeSet(self, key, values):
#     def __getitem__(self, key):
#     def get(self, key, default=None):
#     def has_key(self, key):
#     def __contains__(self, key):
#     def keys(self):
#     def items(self):
#     def __str__(self):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def __len__(self):
#     def __nonzero__(self):
#     def __repr__(self):
#     def diff(self, other):
#     def bind(self, password):
#     def _bind(self, password):
#     def hasMember(self, dn):
#     def __hash__(self):
#     def __setitem__(self, key, value):
#     def __delitem__(self, key):
#     def undo(self):
#     def commit(self):
#     def move(self, newDN):
#     def delete(self):
#     def setPassword(self, newPasswd, salt=None):
# class BaseLDAPEntry(object):
# class EditableLDAPEntry(BaseLDAPEntry):


from twisted.trial import unittest
from ldaptor import delta, entry
    def testAdd_New_OneType_ManyValues(self):
        a = entry.BaseLDAPEntry(dn='dc=foo',
                                attributes={
            'foo': ['bar'],
            })
        b = entry.BaseLDAPEntry(dn='dc=foo',
                                attributes={
            'foo': ['bar'],
            'baz': ['quux', 'thud', 'foo'],
            })
        result = a.diff(b)
        self.assertEquals(result,
                          delta.ModifyOp('dc=foo',
                                         [
            delta.Add('baz', ['quux', 'thud', 'foo']),
            ]))

    def testAdd_New_ManyTypes(self):
        a = entry.BaseLDAPEntry(dn='dc=foo',
                                attributes={
            'foo': ['bar'],
            })
        b = entry.BaseLDAPEntry(dn='dc=foo',
                                attributes={
            'foo': ['bar'],
            'baz': ['quux'],
            'bang': ['thud'],
            })
        result = a.diff(b)
        self.assertEquals(result,

# Path: ldaptor/delta.py
# class Modification(attributeset.LDAPAttributeSet):
# class Add(Modification):
# class Delete(Modification):
# class Replace(Modification):
# class Operation(object):
# class ModifyOp(Operation):
# class AddOp(Operation):
# class DeleteOp(Operation):
#     def patch(self, entry):
#     def asLDAP(self):
#     def __eq__(self, other):
#     def patch(self, entry):
#     def asLDIF(self):
#     def patch(self, entry):
#     def asLDIF(self):
#     def patch(self, entry):
#     def asLDIF(self):
#     def patch(self, root):
#     def __init__(self, dn, modifications=[]):
#     def asLDIF(self):
#     def asLDAP(self):
#     def _getClassFromOp(class_, op):
#     def fromLDAP(class_, request):
#     def patch(self, root):
#         def gotEntry(entry, modifications):
#     def __repr__(self):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def __init__(self, entry):
#     def asLDIF(self):
#     def patch(self, root):
#         def gotParent(parent, entry):
#     def __repr__(self):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def __init__(self, dn):
#     def asLDIF(self):
#     def patch(self, root):
#         def gotEntry(entry):
#     def __repr__(self):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     _LDAP_OP = None
#     _LDAP_OP = 0
#     _LDAP_OP = 1
#     _LDAP_OP = 2
# 
# Path: ldaptor/entry.py
# def sshaDigest(passphrase, salt=None):
#     def __init__(self, dn, attributes={}):
#     def buildAttributeSet(self, key, values):
#     def __getitem__(self, key):
#     def get(self, key, default=None):
#     def has_key(self, key):
#     def __contains__(self, key):
#     def keys(self):
#     def items(self):
#     def __str__(self):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def __len__(self):
#     def __nonzero__(self):
#     def __repr__(self):
#     def diff(self, other):
#     def bind(self, password):
#     def _bind(self, password):
#     def hasMember(self, dn):
#     def __hash__(self):
#     def __setitem__(self, key, value):
#     def __delitem__(self, key):
#     def undo(self):
#     def commit(self):
#     def move(self, newDN):
#     def delete(self):
#     def setPassword(self, newPasswd, salt=None):
# class BaseLDAPEntry(object):
# class EditableLDAPEntry(BaseLDAPEntry):


# Path: ldaptor/test/test_entry_diff.py
from twisted.trial import unittest
from ldaptor import delta, entry

    def testAdd_New_OneType_ManyValues(self):
        a = entry.BaseLDAPEntry(dn='dc=foo',
                                attributes={
            'foo': ['bar'],
            })
        b = entry.BaseLDAPEntry(dn='dc=foo',
                                attributes={
            'foo': ['bar'],
            'baz': ['quux', 'thud', 'foo'],
            })
        result = a.diff(b)
        self.assertEquals(result,
                          delta.ModifyOp('dc=foo',
                                         [
            delta.Add('baz', ['quux', 'thud', 'foo']),
            ]))

    def testAdd_New_ManyTypes(self):
        a = entry.BaseLDAPEntry(dn='dc=foo',
                                attributes={
            'foo': ['bar'],
            })
        b = entry.BaseLDAPEntry(dn='dc=foo',
                                attributes={
            'foo': ['bar'],
            'baz': ['quux'],
            'bang': ['thud'],
            })
        result = a.diff(b)
        self.assertEquals(result,

                          delta.ModifyOp('dc=foo',