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