diff options
Diffstat (limited to 'qpid/python/qpid/tests/messaging/message.py')
-rw-r--r-- | qpid/python/qpid/tests/messaging/message.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/qpid/python/qpid/tests/messaging/message.py b/qpid/python/qpid/tests/messaging/message.py index 297374b82b..7328165db7 100644 --- a/qpid/python/qpid/tests/messaging/message.py +++ b/qpid/python/qpid/tests/messaging/message.py @@ -153,3 +153,16 @@ class MessageEchoTests(Base): f = echo.content["false"] assert isinstance(t, bool), t assert isinstance(f, bool), f + + def testExceptionRaisedMismatchedContentType(self): + msg = Message(content_type="amqp/map", content="asdf") + try: + self.snd.send(msg) + self.rcv.fetch(0) + assert False, "Exception not raised on mismatched content/content_type" + except Exception, e: + pass + + def testRecoverAfterException(self): + self.testExceptionRaisedMismatchedContentType() + self.testTextPlain() |