|
@@ -166,6 +166,13 @@ class MsgQTest(unittest.TestCase):
|
|
"""
|
|
"""
|
|
Send several packets through the MsgQ and check it generates
|
|
Send several packets through the MsgQ and check it generates
|
|
undeliverable notifications under the correct circumstances.
|
|
undeliverable notifications under the correct circumstances.
|
|
|
|
+
|
|
|
|
+ The test is not exhaustive as it doesn't test all combination
|
|
|
|
+ of existence of the recipient, addressing schemes, want_answer
|
|
|
|
+ header and the reply header. It is not needed, these should
|
|
|
|
+ be mostly independant (eg. if the recipient is missing, it
|
|
|
|
+ shouldn't matter why to the handling of the reply header). If
|
|
|
|
+ we included everything, the test would have too many scenarios.
|
|
"""
|
|
"""
|
|
sent_messages = []
|
|
sent_messages = []
|
|
def fake_send_prepared_msg(socket, msg):
|
|
def fake_send_prepared_msg(socket, msg):
|
|
@@ -214,12 +221,7 @@ class MsgQTest(unittest.TestCase):
|
|
self.parse_msg(sent_messages[0][1]))
|
|
self.parse_msg(sent_messages[0][1]))
|
|
|
|
|
|
sent_messages = []
|
|
sent_messages = []
|
|
-
|
|
+
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
routing["reply"] = 3
|
|
routing["reply"] = 3
|
|
self.__msgq.process_command_send(sender, routing, data)
|
|
self.__msgq.process_command_send(sender, routing, data)
|
|
self.assertEqual([], sent_messages)
|
|
self.assertEqual([], sent_messages)
|