diff options
| author | Gordon Sim <gsim@apache.org> | 2007-02-12 17:33:54 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2007-02-12 17:33:54 +0000 |
| commit | bdc6d9b233bfa27bf3b3908ebffd6d0f75515d88 (patch) | |
| tree | c224c3f26cb7e21c0a6467438b6bfcaebfb1c495 /python | |
| parent | cec1521f9e022bf695dbeddf8ea9a1769dca9f94 (diff) | |
| download | qpid-python-bdc6d9b233bfa27bf3b3908ebffd6d0f75515d88.tar.gz | |
Added a test for message_reject.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@506545 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python')
| -rw-r--r-- | python/tests/message.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/python/tests/message.py b/python/tests/message.py index c22a0396ef..cb26c7508a 100644 --- a/python/tests/message.py +++ b/python/tests/message.py @@ -621,6 +621,21 @@ class MessageTests(TestBase): msg = queue.get(timeout=1) self.assertEquals(msg.message_id, "empty-msg") self.assertDataEquals(channel, msg, "") + + def test_reject(self): + channel = self.channel + channel.queue_declare(queue = "q", exclusive=True) + + channel.message_consume(queue = "q", destination = "consumer") + channel.message_transfer(routing_key = "q", body="blah, blah") + msg = self.client.queue("consumer").get(timeout = 5) + self.assertEquals(msg.body, "blah, blah") + channel.message_cancel(destination = "consumer") + msg.reject() + + channel.message_consume(queue = "q", destination = "checker") + msg = self.client.queue("checker").get(timeout = 5) + self.assertEquals(msg.body, "blah, blah") def assertDataEquals(self, channel, msg, expected): |
