def test_send(self):
        """
        L{FakeSocket.send} accepts the entire string passed to it, adds it to
        its send buffer, and returns its length.
        """
        skt = FakeSocket(b"")
        count = skt.send(b"foo")
        self.assertEqual(count, 3)
        self.assertEqual(skt.sendBuffer, [b"foo"])

        L{FakeSocket.send} accepts the entire string passed to it, adds it to
        its send buffer, and returns its length.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/test/test_tcp.py