def test_writeWithUnicodeRaisesException(self):
        """
        L{FileDescriptor.write} doesn't accept unicode data.
        """
        fileDescriptor = FileDescriptor(reactor=object())
        self.assertRaises(TypeError, fileDescriptor.write, u'foo')

        L{FileDescriptor.write} doesn't accept unicode data.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/test/test_filedescriptor.py