def testErrorHandling_extended(self):
        client = LDAPClientTestDriver(
            [pureldap.LDAPExtendedResponse(resultCode=ldaperrors.LDAPProtocolError.resultCode,
                                                 responseName='1.3.6.1.4.1.1466.20036',
                                                 errorMessage='Unknown request')
             ])
        o=ldapsyntax.LDAPEntry(client=client,
                               dn='cn=foo,dc=example,dc=com',
                               attributes={
            'objectClass': ['a'],
            })
        d=o.delete()
        def eb(fail):
            fail.trap(ldaperrors.LDAPProtocolError)
            self.assertEquals(fail.value.message, 'Unknown request')

            client.assertSent(pureldap.LDAPDelRequest(
                entry='cn=foo,dc=example,dc=com',
                ))
        d.addCallbacks(testutil.mustRaise, eb)
        return d
LDAPEntry.delete should pass even non-LDAPDelResponse errors to it's deferred.
dataset/ETHPy150Open twisted/ldaptor/ldaptor/test/test_ldapsyntax.py/LDAPSyntaxDelete.testErrorHandling_extended