'When an L{IProtocol} implementation that returns a value from its
C{dataReceived} method, a deprecated warning is emitted.'

def test_doReadWarningIsRaised(self):

    skt = FakeSocket('someData')
    protocol = FakeProtocol()
    conn = Connection(skt, protocol)
    conn.doRead()
    warnings = self.flushWarnings([FakeProtocol.dataReceived])
    self.assertEqual(warnings[0]['category'], DeprecationWarning)
    self.assertEqual(warnings[0]['message'], 'Returning    a    value    other    than    None    from    twisted.internet.test.test_tcp.FakeProtocol.dataReceived    is    deprecated    since    Twisted    11.0.0.')
    self.assertEqual(len(warnings), 1)
