def test_noUnicode(self):
        """
        Test that L{proto_helpers.StringTransport} doesn't accept unicode data.
        """
        s = proto_helpers.StringTransport()
        self.assertRaises(TypeError, s.write, u'foo')

        Test that L{proto_helpers.StringTransport} doesn't accept unicode data.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_protocols.py