diff options
author | Rafael H. Schloming <rhs@apache.org> | 2009-07-16 20:41:20 +0000 |
---|---|---|
committer | Rafael H. Schloming <rhs@apache.org> | 2009-07-16 20:41:20 +0000 |
commit | c68688b2286bc0581f141a5a9a146987ee74c1b8 (patch) | |
tree | ab2196d5bca35ff8a71d68151482a5281c422e5d /python/qpid/tests/messaging.py | |
parent | 4194164de9f2286338e82eab6e8ac96260356870 (diff) | |
download | qpid-python-c68688b2286bc0581f141a5a9a146987ee74c1b8.tar.gz |
added a ConnectError exception
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@794844 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/tests/messaging.py')
-rw-r--r-- | python/qpid/tests/messaging.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/python/qpid/tests/messaging.py b/python/qpid/tests/messaging.py index 15cc776f44..8a142d6c96 100644 --- a/python/qpid/tests/messaging.py +++ b/python/qpid/tests/messaging.py @@ -22,7 +22,7 @@ import time from qpid.tests import Test -from qpid.messaging import Connection, Disconnected, Empty, Message, UNLIMITED, uuid4 +from qpid.messaging import Connection, ConnectError, Disconnected, Empty, Message, UNLIMITED, uuid4 from Queue import Queue, Empty as QueueEmpty class Base(Test): @@ -99,6 +99,13 @@ class SetupTests(Base): self.conn.connect() self.ping(self.conn.session()) + def testConnectError(self): + try: + self.conn = Connection.open("localhost", 0) + assert False, "connect succeeded" + except ConnectError: + pass + class ConnectionTests(Base): def setup_connection(self): |