'Subclasses which override locateResponder under its old name,
lookupFunction, should have the override invoked instead.  (This tests
an AMP subclass, because in the version of the code that could invoke
this deprecated code path, there was no L{CommandLocator}.)'

def test_lookupFunctionDeprecatedOverride(self):

    locator = OverrideLocatorAMP()
    customResponderObject = self.assertWarns(PendingDeprecationWarning, 'Override    locateResponder,    not    lookupFunction.', __file__, (lambda : locator.locateResponder('custom')))
    self.assertEqual(locator.customResponder, customResponderObject)
    normalResponderObject = self.assertWarns(PendingDeprecationWarning, 'Override    locateResponder,    not    lookupFunction.', __file__, (lambda : locator.locateResponder('simple')))
    result = normalResponderObject(amp.Box(greeting='ni    hao', cookie='5'))
    def done(values):
        self.assertEqual(values, amp.AmpBox(cookieplus='8'))
    return result.addCallback(done)
