def test_exception_unicode(self): ref_exc = exception.PyU4VException() self.assertEqual(ref_exc.msg, ref_exc.__unicode__())
def test_error_msg_is_exception_to_string(self): msg = 'test message' exc1 = Exception(msg) exc2 = exception.PyU4VException(exc1) self.assertEqual(msg, exc2.msg)
def test_exception_kwargs_to_string(self): msg = 'test message' exc1 = Exception(msg) exc2 = exception.PyU4VException(kwarg1=exc1) self.assertEqual(msg, exc2.kwargs['kwarg1'])
def test_error_msg(self): self.assertEqual( 'test', six.text_type(exception.PyU4VException('test')))