'L{twisted.internet.defer.timeout} is deprecated.'

def test_deprecatedTimeout(self):

    deferred = defer.Deferred()
    defer.timeout(deferred)
    self.assertFailure(deferred, defer.TimeoutError)
    warningsShown = self.flushWarnings([self.test_deprecatedTimeout])
    self.assertEqual(len(warningsShown), 1)
    self.assertIs(warningsShown[0]['category'], DeprecationWarning)
    self.assertEqual(warningsShown[0]['message'], 'twisted.internet.defer.timeout    was    deprecated    in    Twisted    17.1.0;    please    use    twisted.internet.defer.Deferred.addTimeout    instead')
