'force_bytes knows how to convert to bytes an exception
containing non-ASCII characters in its args.'

def test_force_bytes_exception(self):

    error_msg = 'This    is    an    exception,    voil\xc3\xa0'
    exc = ValueError(error_msg)
    self.assertEqual(force_bytes(exc), error_msg.encode())
    self.assertEqual(force_bytes(exc, encoding='ascii', errors='ignore'), 'This    is    an    exception,    voil')
