def test_writeAfterClose(self):
        """
        L{FakeTransport.write} will accept writes after transport was closed,
        but the data will be silently discarded.
        """
        a = FakeTransport(object(), False)
        a.write(b"before")
        a.loseConnection()
        a.write(b"after")

        self.assertEqual(b"".join(a.stream), b"before")

        L{FakeTransport.write} will accept writes after transport was closed,
        but the data will be silently discarded.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_iosim.py