'The C{\'wsgi.errors\'} file-like object from the C{environ} C{dict}
permits writes of only native strings in Python 3, and raises
C{TypeError} for writes of non-native strings.'

def test_wsgiErrorsAcceptsOnlyNativeStringsInPython3(self):

    if (not _PY3):
        raise SkipTest('Relevant    only    in    Python    3')
    (request, result) = self.prepareRequest()
    request.requestReceived()
    (environ, _) = self.successResultOf(result)
    errors = environ['wsgi.errors']
    error = self.assertRaises(TypeError, errors.write, 'fred')
    self.assertEqual("write()    argument    must    be    str,    not    b'fred'    (bytes)", str(error))
