def test_dump_body_buffer(self): msg = Mock() msg.body = 'str' try: buf = buffer(msg.body) except NameError: raise SkipTest('buffer type not available') self.assertTrue(dump_body(msg, buf))