Author: rhs
Date: Sat Mar 23 15:27:00 2013
New Revision: 1460174

URL: http://svn.apache.org/r1460174
Log:
added *.class to svn:ignore

Modified:
    qpid/proton/trunk/tests/python/proton_tests/   (props changed)
    qpid/proton/trunk/tests/python/proton_tests/messenger.py

Propchange: qpid/proton/trunk/tests/python/proton_tests/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sat Mar 23 15:27:00 2013
@@ -0,0 +1 @@
+*.class

Modified: qpid/proton/trunk/tests/python/proton_tests/messenger.py
URL: 
http://svn.apache.org/viewvc/qpid/proton/trunk/tests/python/proton_tests/messenger.py?rev=1460174&r1=1460173&r2=1460174&view=diff
==============================================================================
--- qpid/proton/trunk/tests/python/proton_tests/messenger.py (original)
+++ qpid/proton/trunk/tests/python/proton_tests/messenger.py Sat Mar 23 
15:27:00 2013
@@ -338,3 +338,73 @@ class MessengerTest(Test):
 
     # need to restart client, as teardown() uses it to stop server
     self.client.start()
+
+  def testRoute(self):
+    self.server.subscribe("amqps://~0.0.0.0:12346")
+    self.client.route("route1", "amqp://0.0.0.0:12345")
+    self.client.route("route2", "amqps://0.0.0.0:12346")
+    self.start()
+
+    msg = Message()
+    msg.address = "route1"
+    msg.body = "test"
+    self.client.put(msg)
+    self.client.recv(1)
+
+    reply = Message()
+    self.client.get(reply)
+
+    msg = Message()
+    msg.address = "route2"
+    msg.body = "test"
+    self.client.put(msg)
+    self.client.recv(1)
+
+    self.client.get(reply)
+    assert reply.body == "test"
+
+  def testDefaultRoute(self):
+    self.client.route("*", "amqp://0.0.0.0:12345")
+    self.start()
+
+    msg = Message()
+    msg.address = "asdf"
+    msg.body = "test"
+
+    self.client.put(msg)
+    self.client.recv(1)
+
+    reply = Message()
+    self.client.get(reply)
+    assert reply.body == "test"
+
+  def testDefaultRouteSubstitution(self):
+    self.client.route("*", "amqp://0.0.0.0:12345/$1")
+    self.start()
+
+    msg = Message()
+    msg.address = "asdf"
+    msg.body = "test"
+
+    self.client.put(msg)
+    self.client.recv(1)
+
+    reply = Message()
+    self.client.get(reply)
+    assert reply.body == "test"
+
+  def testIncomingRoute(self):
+    self.client.route("in", "amqp://~0.0.0.0:12346")
+    self.client.subscribe("in")
+    self.start()
+
+    msg = Message()
+    msg.address = "amqp://0.0.0.0:12345"
+    msg.reply_to = "amqp://0.0.0.0:12346"
+    msg.body = "test"
+
+    self.client.put(msg)
+    self.client.recv(1)
+    reply = Message()
+    self.client.get(reply)
+    assert reply.body == "test"



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to