diff --git a/tests/test_exceptions.py b/tests/test_exceptions.py index 33c11786d5aec6ad818b54e9dd2485671e723383..1e84b0e2258e8b1050d2b367ae30840f9e6b0e2a 100644 --- a/tests/test_exceptions.py +++ b/tests/test_exceptions.py @@ -1,6 +1,6 @@ # coding=UTF-8 from __future__ import print_function, absolute_import, division -import six + import unittest from coolamqp.exceptions import AMQPError @@ -13,3 +13,8 @@ class TestExcs(unittest.TestCase): self.assertTrue(u'100' in str(e)) self.assertTrue(u'wtf' in str(e)) self.assertTrue(repr(e).startswith(u'AMQPError')) + + def test_parses_memoryview_correctly(self): + e = AMQPError(100, memoryview(u'wtf'.encode('utf8')), 0, 0) + self.assertIn('wtf', str(e)) + self.assertIn('wtf', repr(e))