From b5ffb57ba7d61c0200007492d64f01d79b69b7f0 Mon Sep 17 00:00:00 2001 From: Kenneth Giusti Date: Wed, 30 Apr 2014 11:28:28 -0400 Subject: [PATCH] rename the project to avoid name collsion on PyPi --- README.md | 2 +- docs/User-Guide.md | 2 +- examples/python/recv.py | 6 ++--- examples/python/rpc-client.py | 14 +++++------ examples/python/rpc-server.py | 18 +++++++------- examples/python/send.py | 4 ++-- examples/python/server.py | 18 +++++++------- examples/python/utils.py | 20 ++++++++-------- python/{dingus => pyngus}/__init__.py | 12 +++++----- python/{dingus => pyngus}/connection.py | 4 ++-- python/{dingus => pyngus}/container.py | 2 +- python/{dingus => pyngus}/endpoint.py | 0 python/{dingus => pyngus}/link.py | 4 ++-- python/{dingus => pyngus}/sockets.py | 2 +- setup.py | 6 ++--- tests/python/README.md | 2 +- tests/python/perf-test.py | 10 ++++---- tests/python/unit_tests/common.py | 8 +++---- tests/python/unit_tests/connection.py | 16 ++++++------- tests/python/unit_tests/container.py | 10 ++++---- tests/python/unit_tests/link.py | 32 ++++++++++++------------- 21 files changed, 96 insertions(+), 96 deletions(-) rename python/{dingus => pyngus}/__init__.py (71%) rename python/{dingus => pyngus}/connection.py (99%) rename python/{dingus => pyngus}/container.py (98%) rename python/{dingus => pyngus}/endpoint.py (100%) rename python/{dingus => pyngus}/link.py (99%) rename python/{dingus => pyngus}/sockets.py (98%) diff --git a/README.md b/README.md index 48f8e42..9c98094 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# dingus # +# pyngus # A messaging framework built on the QPID Proton engine. It provides a callback-based API for message passing. diff --git a/docs/User-Guide.md b/docs/User-Guide.md index f19b9c2..26e10e6 100644 --- a/docs/User-Guide.md +++ b/docs/User-Guide.md @@ -1,4 +1,4 @@ -# Dingus # +# Pyngus # A callback-based messaging framework built around the QPID Proton engine. diff --git a/examples/python/recv.py b/examples/python/recv.py index ec587ee..3e5ad60 100755 --- a/examples/python/recv.py +++ b/examples/python/recv.py @@ -24,7 +24,7 @@ import optparse import sys import uuid -import dingus +import pyngus from utils import connect_socket from utils import get_host_port from utils import process_connection @@ -62,7 +62,7 @@ def main(argv=None): # create AMQP Container, Connection, and SenderLink # - container = dingus.Container(uuid.uuid4().hex) + container = pyngus.Container(uuid.uuid4().hex) conn_properties = {'hostname': host} if opts.trace: conn_properties["x-trace-protocol"] = True @@ -78,7 +78,7 @@ def main(argv=None): connection.pn_sasl.client() connection.open() - class ReceiveCallback(dingus.ReceiverEventHandler): + class ReceiveCallback(pyngus.ReceiverEventHandler): def __init__(self): self.done = False self.message = None diff --git a/examples/python/rpc-client.py b/examples/python/rpc-client.py index bb8c4ac..5b76d63 100755 --- a/examples/python/rpc-client.py +++ b/examples/python/rpc-client.py @@ -34,13 +34,13 @@ import time import uuid from proton import Message -import dingus +import pyngus LOG = logging.getLogger() LOG.addHandler(logging.StreamHandler()) -class MyConnection(dingus.ConnectionEventHandler): +class MyConnection(pyngus.ConnectionEventHandler): def __init__(self, name, container, properties): self.name = name @@ -95,11 +95,11 @@ class MyConnection(dingus.ConnectionEventHandler): LOG.debug("select() returned") if readable: - dingus.read_socket_input(self.connection, + pyngus.read_socket_input(self.connection, self.socket) self.connection.process(time.time()) if writable: - dingus.write_socket_output(self.connection, + pyngus.write_socket_output(self.connection, self.socket) def close(self, error=None): @@ -160,8 +160,8 @@ class MyConnection(dingus.ConnectionEventHandler): LOG.debug("SASL done, result=%s", str(result)) -class MyCaller(dingus.SenderEventHandler, - dingus.ReceiverEventHandler): +class MyCaller(pyngus.SenderEventHandler, + pyngus.ReceiverEventHandler): """Implements state for a single RPC call.""" def __init__(self, method_map, my_connection, @@ -355,7 +355,7 @@ def main(argv=None): # create AMQP container, connection, sender and receiver # - container = dingus.Container(uuid.uuid4().hex) + container = pyngus.Container(uuid.uuid4().hex) conn_properties = {} if opts.trace: conn_properties["x-trace-protocol"] = True diff --git a/examples/python/rpc-server.py b/examples/python/rpc-server.py index bbed503..80772c7 100755 --- a/examples/python/rpc-server.py +++ b/examples/python/rpc-server.py @@ -43,7 +43,7 @@ import uuid # hp = hpy() from proton import Message, Condition -import dingus +import pyngus LOG = logging.getLogger() LOG.addHandler(logging.StreamHandler()) @@ -60,8 +60,8 @@ reply_senders = {} socket_connections = {} # indexed by name -class SocketConnection(dingus.ConnectionEventHandler): - """Associates a dingus Connection with a python network socket""" +class SocketConnection(pyngus.ConnectionEventHandler): + """Associates a pyngus Connection with a python network socket""" def __init__(self, name, socket_, container, conn_properties): self.name = name @@ -91,7 +91,7 @@ class SocketConnection(dingus.ConnectionEventHandler): def process_input(self): """Called when socket is read-ready""" try: - dingus.read_socket_input(self.connection, self.socket) + pyngus.read_socket_input(self.connection, self.socket) except Exception as e: LOG.error("Exception on socket read: %s", str(e)) # may be redundant if closed cleanly: @@ -103,7 +103,7 @@ class SocketConnection(dingus.ConnectionEventHandler): def send_output(self): """Called when socket is write-ready""" try: - dingus.write_socket_output(self.connection, + pyngus.write_socket_output(self.connection, self.socket) except Exception as e: LOG.error("Exception on socket write: %s", str(e)) @@ -187,7 +187,7 @@ class SocketConnection(dingus.ConnectionEventHandler): LOG.debug("SASL done callback, result=%s", str(result)) -class MySenderLink(dingus.SenderEventHandler): +class MySenderLink(pyngus.SenderEventHandler): """Link for sending RPC replies.""" def __init__(self, ident, connection, link_handle, source_address, properties=None): @@ -227,7 +227,7 @@ class MySenderLink(dingus.SenderEventHandler): LOG.debug("message sent callback, status=%s", str(status)) -class MyReceiverLink(dingus.ReceiverEventHandler): +class MyReceiverLink(pyngus.ReceiverEventHandler): """ """ def __init__(self, ident, connection, link_handle, target_address, @@ -353,7 +353,7 @@ def main(argv=None): # create an AMQP container that will 'provide' the RPC service # - container = dingus.Container("example RPC service") + container = pyngus.Container("example RPC service") global socket_connections while True: @@ -366,7 +366,7 @@ def main(argv=None): writefd = [] readers, writers, timers = container.need_processing() - # map dingus Connections back to my SocketConnections + # map pyngus Connections back to my SocketConnections for c in readers: sc = c.user_context assert sc and isinstance(sc, SocketConnection) diff --git a/examples/python/send.py b/examples/python/send.py index 4690062..2d23d9e 100755 --- a/examples/python/send.py +++ b/examples/python/send.py @@ -25,7 +25,7 @@ import sys import uuid from proton import Message -import dingus +import pyngus from utils import connect_socket from utils import get_host_port from utils import process_connection @@ -67,7 +67,7 @@ def main(argv=None): # create AMQP Container, Connection, and SenderLink # - container = dingus.Container(uuid.uuid4().hex) + container = pyngus.Container(uuid.uuid4().hex) conn_properties = {'hostname': host} if opts.trace: conn_properties["x-trace-protocol"] = True diff --git a/examples/python/server.py b/examples/python/server.py index a07d435..08389e5 100755 --- a/examples/python/server.py +++ b/examples/python/server.py @@ -27,7 +27,7 @@ import time import uuid from proton import Message -import dingus +import pyngus from utils import get_host_port from utils import server_socket @@ -36,8 +36,8 @@ LOG = logging.getLogger() LOG.addHandler(logging.StreamHandler()) -class SocketConnection(dingus.ConnectionEventHandler): - """Associates a dingus Connection with a python network socket""" +class SocketConnection(pyngus.ConnectionEventHandler): + """Associates a pyngus Connection with a python network socket""" def __init__(self, container, socket_, name, properties): """Create a Connection using socket_.""" @@ -74,7 +74,7 @@ class SocketConnection(dingus.ConnectionEventHandler): def process_input(self): """Called when socket is read-ready""" try: - dingus.read_socket_input(self.connection, self.socket) + pyngus.read_socket_input(self.connection, self.socket) except Exception as e: LOG.error("Exception on socket read: %s", str(e)) # may be redundant if closed cleanly: @@ -85,7 +85,7 @@ class SocketConnection(dingus.ConnectionEventHandler): def send_output(self): """Called when socket is write-ready""" try: - dingus.write_socket_output(self.connection, + pyngus.write_socket_output(self.connection, self.socket) except Exception as e: LOG.error("Exception on socket write: %s", str(e)) @@ -143,7 +143,7 @@ class SocketConnection(dingus.ConnectionEventHandler): LOG.debug("SASL done callback, result=%s", str(result)) -class MySenderLink(dingus.SenderEventHandler): +class MySenderLink(pyngus.SenderEventHandler): """Send messages until credit runs out.""" def __init__(self, socket_conn, handle, src_addr=None): self.socket_conn = socket_conn @@ -198,7 +198,7 @@ class MySenderLink(dingus.SenderEventHandler): self.send_message() -class MyReceiverLink(dingus.ReceiverEventHandler): +class MyReceiverLink(pyngus.ReceiverEventHandler): """Receive messages, and drop them.""" def __init__(self, socket_conn, handle, rx_addr=None): self.socket_conn = socket_conn @@ -270,7 +270,7 @@ def main(argv=None): # create an AMQP container that will 'provide' the Server service # - container = dingus.Container("Server") + container = pyngus.Container("Server") socket_connections = set() # Main loop: process I/O and timer events: @@ -278,7 +278,7 @@ def main(argv=None): while True: readers, writers, timers = container.need_processing() - # map dingus Connections back to my SocketConnections: + # map pyngus Connections back to my SocketConnections: readfd = [c.user_context for c in readers] writefd = [c.user_context for c in writers] diff --git a/examples/python/utils.py b/examples/python/utils.py index 67ba39d..4a77622 100644 --- a/examples/python/utils.py +++ b/examples/python/utils.py @@ -24,7 +24,7 @@ import socket import select import time -import dingus +import pyngus def get_host_port(server_address): @@ -103,19 +103,19 @@ def process_connection(connection, my_socket): [], timeout) if readable: - dingus.read_socket_input(connection, my_socket) + pyngus.read_socket_input(connection, my_socket) connection.process(time.time()) if writable: - dingus.write_socket_output(connection, my_socket) + pyngus.write_socket_output(connection, my_socket) return True # Map the send callback status to a string SEND_STATUS = { - dingus.SenderLink.ABORTED: "Aborted", - dingus.SenderLink.TIMED_OUT: "Timed-out", - dingus.SenderLink.UNKNOWN: "Unknown", - dingus.SenderLink.ACCEPTED: "Accepted", - dingus.SenderLink.REJECTED: "REJECTED", - dingus.SenderLink.RELEASED: "RELEASED", - dingus.SenderLink.MODIFIED: "MODIFIED" + pyngus.SenderLink.ABORTED: "Aborted", + pyngus.SenderLink.TIMED_OUT: "Timed-out", + pyngus.SenderLink.UNKNOWN: "Unknown", + pyngus.SenderLink.ACCEPTED: "Accepted", + pyngus.SenderLink.REJECTED: "REJECTED", + pyngus.SenderLink.RELEASED: "RELEASED", + pyngus.SenderLink.MODIFIED: "MODIFIED" } diff --git a/python/dingus/__init__.py b/python/pyngus/__init__.py similarity index 71% rename from python/dingus/__init__.py rename to python/pyngus/__init__.py index 201388c..90845b5 100644 --- a/python/dingus/__init__.py +++ b/python/pyngus/__init__.py @@ -16,9 +16,9 @@ # specific language governing permissions and limitations # under the License. # -from dingus.container import Container -from dingus.connection import Connection, ConnectionEventHandler -from dingus.link import ReceiverLink, ReceiverEventHandler -from dingus.link import SenderLink, SenderEventHandler -from dingus.sockets import read_socket_input -from dingus.sockets import write_socket_output +from pyngus.container import Container +from pyngus.connection import Connection, ConnectionEventHandler +from pyngus.link import ReceiverLink, ReceiverEventHandler +from pyngus.link import SenderLink, SenderEventHandler +from pyngus.sockets import read_socket_input +from pyngus.sockets import write_socket_output diff --git a/python/dingus/connection.py b/python/pyngus/connection.py similarity index 99% rename from python/dingus/connection.py rename to python/pyngus/connection.py index cf2333c..ab5baa8 100644 --- a/python/dingus/connection.py +++ b/python/pyngus/connection.py @@ -26,8 +26,8 @@ import proton import time import warnings -from dingus.endpoint import Endpoint -from dingus.link import _SessionProxy +from pyngus.endpoint import Endpoint +from pyngus.link import _SessionProxy LOG = logging.getLogger(__name__) diff --git a/python/dingus/container.py b/python/pyngus/container.py similarity index 98% rename from python/dingus/container.py rename to python/pyngus/container.py index 6697ec3..965618b 100644 --- a/python/dingus/container.py +++ b/python/pyngus/container.py @@ -21,7 +21,7 @@ __all__ = [ import heapq import logging -from dingus.connection import Connection +from pyngus.connection import Connection LOG = logging.getLogger(__name__) diff --git a/python/dingus/endpoint.py b/python/pyngus/endpoint.py similarity index 100% rename from python/dingus/endpoint.py rename to python/pyngus/endpoint.py diff --git a/python/dingus/link.py b/python/pyngus/link.py similarity index 99% rename from python/dingus/link.py rename to python/pyngus/link.py index 69081fe..412cb09 100644 --- a/python/dingus/link.py +++ b/python/pyngus/link.py @@ -26,7 +26,7 @@ import collections import logging import proton -from dingus.endpoint import Endpoint +from pyngus.endpoint import Endpoint LOG = logging.getLogger(__name__) @@ -264,7 +264,7 @@ class SenderLink(_Link): def send(self, message, delivery_callback=None, handle=None, deadline=None): - tag = "dingus-tag-%s" % self._next_tag + tag = "pyngus-tag-%s" % self._next_tag self._next_tag += 1 send_req = SenderLink._SendRequest(self, tag, message, delivery_callback, handle, diff --git a/python/dingus/sockets.py b/python/pyngus/sockets.py similarity index 98% rename from python/dingus/sockets.py rename to python/pyngus/sockets.py index 27b3975..225b3fe 100644 --- a/python/dingus/sockets.py +++ b/python/pyngus/sockets.py @@ -27,7 +27,7 @@ import errno import logging import socket -from dingus.connection import Connection +from pyngus.connection import Connection LOG = logging.getLogger(__name__) diff --git a/setup.py b/setup.py index c4c50bf..546ecd5 100644 --- a/setup.py +++ b/setup.py @@ -19,11 +19,11 @@ # from distutils.core import setup -setup(name="dingus", +setup(name="pyngus", version="0.1.0", author="kgiusti", author_email="kgiusti@apache.org", - packages=["dingus"], - package_dir={"dingus": "python/dingus"}, + packages=["pyngus"], + package_dir={"pyngus": "python/pyngus"}, description="Callback API implemented over Proton", license="Apache Software License") diff --git a/tests/python/README.md b/tests/python/README.md index 4a5fd7c..3ec6b3b 100644 --- a/tests/python/README.md +++ b/tests/python/README.md @@ -11,7 +11,7 @@ To run the tests: 3. That's it! The unit tests may be run without tox, but your environment must be -set up so that the dingus module is able to be imported by the test +set up so that the pyngus module is able to be imported by the test scripts. For example, setting the PYTHONPATH environment variable to include the path to the build directory. diff --git a/tests/python/perf-test.py b/tests/python/perf-test.py index 9882a45..c4cd5b8 100755 --- a/tests/python/perf-test.py +++ b/tests/python/perf-test.py @@ -25,10 +25,10 @@ import time import uuid from proton import Message -import dingus +import pyngus -class PerfConnection(dingus.ConnectionEventHandler): +class PerfConnection(pyngus.ConnectionEventHandler): def __init__(self, name, container, properties): self.name = name self.connection = container.create_connection(name, self, @@ -90,7 +90,7 @@ class PerfReceiveConnection(PerfConnection): self._msg_count, self._credit_window) -class PerfSender(dingus.SenderEventHandler): +class PerfSender(pyngus.SenderEventHandler): def __init__(self, address, perf_send_conn, msg_count, batch_size): self.msg = Message() @@ -132,7 +132,7 @@ class PerfSender(dingus.SenderEventHandler): self._send_msgs() -class PerfReceiver(dingus.ReceiverEventHandler): +class PerfReceiver(pyngus.ReceiverEventHandler): def __init__(self, address, handle, perf_receive_conn, msg_count, credit_window): self.msg_count = msg_count @@ -204,7 +204,7 @@ def main(argv=None): opts, extra = parser.parse_args(args=argv) - container = dingus.Container(uuid.uuid4().hex) + container = pyngus.Container(uuid.uuid4().hex) # sender acts like SSL client conn_properties = {'hostname': "test.server.com", diff --git a/tests/python/unit_tests/common.py b/tests/python/unit_tests/common.py index 47b8eff..c7e5813 100644 --- a/tests/python/unit_tests/common.py +++ b/tests/python/unit_tests/common.py @@ -19,7 +19,7 @@ import time -import dingus +import pyngus class Test(object): @@ -94,7 +94,7 @@ def _validate_callback(connection): assert connection._in_process -class ConnCallback(dingus.ConnectionEventHandler): +class ConnCallback(pyngus.ConnectionEventHandler): """Caches the callback parameters for processing by a test.""" class RequestArgs(object): def __init__(self, handle, name, source, target, props): @@ -166,7 +166,7 @@ class ConnCallback(dingus.ConnectionEventHandler): self.sasl_done_ct += 1 -class SenderCallback(dingus.SenderEventHandler): +class SenderCallback(pyngus.SenderEventHandler): def __init__(self): self.active_ct = 0 self.remote_closed_ct = 0 @@ -210,7 +210,7 @@ class DeliveryCallback(object): self.count += 1 -class ReceiverCallback(dingus.ReceiverEventHandler): +class ReceiverCallback(pyngus.ReceiverEventHandler): def __init__(self): self.active_ct = 0 self.remote_closed_ct = 0 diff --git a/tests/python/unit_tests/connection.py b/tests/python/unit_tests/connection.py index d3837ca..edffe21 100644 --- a/tests/python/unit_tests/connection.py +++ b/tests/python/unit_tests/connection.py @@ -24,15 +24,15 @@ import time from proton import Condition from proton import Message from proton import SSLUnavailable -import dingus +import pyngus class APITest(common.Test): def setup(self): - # logging.getLogger("dingus").setLevel(logging.DEBUG) - self.container1 = dingus.Container("test-container-1") - self.container2 = dingus.Container("test-container-2") + # logging.getLogger("pyngus").setLevel(logging.DEBUG) + self.container1 = pyngus.Container("test-container-1") + self.container2 = pyngus.Container("test-container-2") def teardown(self): if self.container1: @@ -374,7 +374,7 @@ class APITest(common.Test): c2.open() common.process_connections(c1, c2) c1.close_input() - assert c1.needs_input == dingus.Connection.EOS + assert c1.needs_input == pyngus.Connection.EOS assert cb1.failed_ct == 0 c1.process(time.time()) assert cb1.failed_ct > 0 @@ -389,7 +389,7 @@ class APITest(common.Test): c2.open() common.process_connections(c1, c2) c1.close_output() - assert c1.has_output == dingus.Connection.EOS + assert c1.has_output == pyngus.Connection.EOS assert cb1.failed_ct == 0 c1.process(time.time()) assert cb1.failed_ct > 0 @@ -528,7 +528,7 @@ class APITest(common.Test): def _test_reject_receiver_sync(self, pn_condition): - class recv_reject(dingus.ConnectionEventHandler): + class recv_reject(pyngus.ConnectionEventHandler): def __init__(self, pn_condition): self._pn_condition = pn_condition @@ -703,7 +703,7 @@ class APITest(common.Test): def _test_reject_sender_sync(self, pn_condition): - class send_reject(dingus.ConnectionEventHandler): + class send_reject(pyngus.ConnectionEventHandler): def __init__(self, pn_condition): self._pn_condition = pn_condition diff --git a/tests/python/unit_tests/container.py b/tests/python/unit_tests/container.py index d225ee2..0954208 100644 --- a/tests/python/unit_tests/container.py +++ b/tests/python/unit_tests/container.py @@ -19,18 +19,18 @@ import common import gc -import dingus +import pyngus class APITest(common.Test): def test_create_destroy(self): - container = dingus.Container("My-Container") + container = pyngus.Container("My-Container") assert container.name == "My-Container" container.destroy() def test_create_connection(self): - container = dingus.Container("A123") + container = pyngus.Container("A123") container.create_connection("c1") container.create_connection("c2") c1 = container.get_connection("c1") @@ -42,7 +42,7 @@ class APITest(common.Test): def test_cleanup(self): gc.enable() - container = dingus.Container("abc") + container = pyngus.Container("abc") c1 = container.create_connection("c1") c2 = container.create_connection("c2") assert c2 @@ -62,7 +62,7 @@ class APITest(common.Test): assert not gc.garbage, "Object leak!" def test_need_processing(self): - container = dingus.Container("abc") + container = pyngus.Container("abc") c1 = container.create_connection("c1") c2 = container.create_connection("c2") props = {"idle-time-out": 10} diff --git a/tests/python/unit_tests/link.py b/tests/python/unit_tests/link.py index 18b01b9..4afbc5f 100644 --- a/tests/python/unit_tests/link.py +++ b/tests/python/unit_tests/link.py @@ -24,14 +24,14 @@ from proton import Condition from proton import Message from proton import symbol -import dingus +import pyngus class APITest(common.Test): def setup(self, conn1_props=None, conn2_props=None): - # logging.getLogger("dingus").setLevel(logging.DEBUG) - self.container1 = dingus.Container("test-container-1") + # logging.getLogger("pyngus").setLevel(logging.DEBUG) + self.container1 = pyngus.Container("test-container-1") self.conn1_handler = common.ConnCallback() if conn1_props is None: # props = {"x-trace-protocol": True} @@ -41,7 +41,7 @@ class APITest(common.Test): conn1_props) self.conn1.open() - self.container2 = dingus.Container("test-container-2") + self.container2 = pyngus.Container("test-container-2") self.conn2_handler = common.ConnCallback() self.conn2 = self.container2.create_connection("conn2", self.conn2_handler, @@ -142,7 +142,7 @@ class APITest(common.Test): assert sl_handler.closed_ct assert sl_handler.active_ct == 0 assert cb.count - assert cb.status == dingus.SenderLink.ABORTED + assert cb.status == pyngus.SenderLink.ABORTED def test_receiver_abort(self): rl_handler = common.ReceiverCallback() @@ -316,7 +316,7 @@ class APITest(common.Test): self.process_connections() assert cb.link == sender assert cb.handle == "my-handle" - assert cb.status == dingus.SenderLink.ACCEPTED + assert cb.status == pyngus.SenderLink.ACCEPTED def test_send_released(self): cb = common.DeliveryCallback() @@ -333,7 +333,7 @@ class APITest(common.Test): self.process_connections() assert cb.link == sender assert cb.handle == "my-handle" - assert cb.status == dingus.SenderLink.RELEASED + assert cb.status == pyngus.SenderLink.RELEASED def test_send_rejected(self): cb = common.DeliveryCallback() @@ -352,7 +352,7 @@ class APITest(common.Test): self.process_connections() assert cb.link == sender assert cb.handle == "my-handle" - assert cb.status == dingus.SenderLink.REJECTED + assert cb.status == pyngus.SenderLink.REJECTED r_cond = cb.info.get("condition") assert r_cond and r_cond.name == "itchy" @@ -372,7 +372,7 @@ class APITest(common.Test): self.process_connections() assert cb.link == sender assert cb.handle == "my-handle" - assert cb.status == dingus.SenderLink.MODIFIED + assert cb.status == pyngus.SenderLink.MODIFIED assert cb.info.get("delivery-failed") is False assert cb.info.get("undeliverable-here") is True info = cb.info.get("message-annotations") @@ -392,7 +392,7 @@ class APITest(common.Test): assert cb.status is None self.process_connections(timestamp=10) assert sender.pending == 0 - assert cb.status == dingus.SenderLink.TIMED_OUT + assert cb.status == pyngus.SenderLink.TIMED_OUT def test_send_expired_late_reply(self): cb = common.DeliveryCallback() @@ -411,7 +411,7 @@ class APITest(common.Test): self.process_connections(timestamp=10) assert rl_handler.message_received_ct == 1 assert sender.pending == 0 - assert cb.status == dingus.SenderLink.TIMED_OUT + assert cb.status == pyngus.SenderLink.TIMED_OUT # late reply: assert cb.count == 1 msg2, handle = rl_handler.received_messages[0] @@ -440,7 +440,7 @@ class APITest(common.Test): self.process_connections(timestamp=12) assert sender.pending == 0 assert cb.count == 1 - assert cb.status == dingus.SenderLink.TIMED_OUT + assert cb.status == pyngus.SenderLink.TIMED_OUT def test_send_expired_no_callback(self): sender, receiver = self._setup_receiver_sync() @@ -510,14 +510,14 @@ class APITest(common.Test): if self.count == 1: # verify that we can safely close ourself, even if there is # a send that has not completed: - assert status == dingus.SenderLink.ACCEPTED + assert status == pyngus.SenderLink.ACCEPTED cond = Condition("indigestion", "old sushi", {"smoked eel": "yummy"}) link.close(cond) else: # the unsent message is aborted prior # to invoking closed callback: - assert status == dingus.SenderLink.ABORTED + assert status == pyngus.SenderLink.ABORTED sl_handler = link.user_context assert sl_handler.closed_ct == 0 @@ -551,7 +551,7 @@ class APITest(common.Test): cond = cb.info.get('condition') assert cond assert cond.name == "indigestion" - assert cb.status == dingus.SenderLink.ABORTED + assert cb.status == pyngus.SenderLink.ABORTED def test_multi_frame_message(self): """Verify multi-frame message send/receive.""" @@ -590,7 +590,7 @@ class APITest(common.Test): receiver1.message_accepted(handle) self.process_connections() assert cb.count - assert cb.status == dingus.SenderLink.ACCEPTED + assert cb.status == pyngus.SenderLink.ACCEPTED def test_dynamic_receiver_props(self): """Verify dynamic-node-properties can be requested."""