def testReplaceAttributes(self):

        client = LDAPClientTestDriver(
            [   pureldap.LDAPModifyResponse(resultCode=0,
                                            matchedDN='',
                                            errorMessage='')
                ])

        o=ldapsyntax.LDAPEntry(client=client,
                               dn='cn=foo,dc=example,dc=com',
                               attributes={
            'objectClass': ['a', 'b'],
            'aValue': ['a'],
            })
        o['aValue']=['foo', 'bar']

        d=o.commit()
        def cb(dummy):
            client.assertSent(delta.ModifyOp('cn=foo,dc=example,dc=com', [
                delta.Replace('aValue', ['foo', 'bar']),
                ]).asLDAP())
        d.addCallback(cb)
        return d
Modify & commit should write the right data to the server.
dataset/ETHPy150Open twisted/ldaptor/ldaptor/test/test_ldapsyntax.py/LDAPSyntaxAttributesModificationOnWire.testReplaceAttributes