Show More
@@ -91,7 +91,7 b' class TestSession(SessionTestCase):' | |||||
91 |
|
91 | |||
92 | content = msg['content'] |
|
92 | content = msg['content'] | |
93 | header = msg['header'] |
|
93 | header = msg['header'] | |
94 | header['date'] = datetime.now() |
|
94 | header['msg_id'] = self.session.msg_id | |
95 | parent = msg['parent_header'] |
|
95 | parent = msg['parent_header'] | |
96 | metadata = msg['metadata'] |
|
96 | metadata = msg['metadata'] | |
97 | msg_type = header['msg_type'] |
|
97 | msg_type = header['msg_type'] | |
@@ -100,7 +100,7 b' class TestSession(SessionTestCase):' | |||||
100 | ident, msg_list = self.session.feed_identities(B.recv_multipart()) |
|
100 | ident, msg_list = self.session.feed_identities(B.recv_multipart()) | |
101 | new_msg = self.session.deserialize(msg_list) |
|
101 | new_msg = self.session.deserialize(msg_list) | |
102 | self.assertEqual(ident[0], b'foo') |
|
102 | self.assertEqual(ident[0], b'foo') | |
103 |
self.assertEqual(new_msg['msg_id'], |
|
103 | self.assertEqual(new_msg['msg_id'],header['msg_id']) | |
104 | self.assertEqual(new_msg['msg_type'],msg['msg_type']) |
|
104 | self.assertEqual(new_msg['msg_type'],msg['msg_type']) | |
105 | self.assertEqual(new_msg['header'],msg['header']) |
|
105 | self.assertEqual(new_msg['header'],msg['header']) | |
106 | self.assertEqual(new_msg['content'],msg['content']) |
|
106 | self.assertEqual(new_msg['content'],msg['content']) | |
@@ -108,12 +108,12 b' class TestSession(SessionTestCase):' | |||||
108 | self.assertEqual(new_msg['parent_header'],msg['parent_header']) |
|
108 | self.assertEqual(new_msg['parent_header'],msg['parent_header']) | |
109 | self.assertEqual(new_msg['buffers'],[b'bar']) |
|
109 | self.assertEqual(new_msg['buffers'],[b'bar']) | |
110 |
|
110 | |||
111 | header['date'] = datetime.now() |
|
111 | header['msg_id'] = self.session.msg_id | |
112 |
|
112 | |||
113 | self.session.send(A, msg, ident=b'foo', buffers=[b'bar']) |
|
113 | self.session.send(A, msg, ident=b'foo', buffers=[b'bar']) | |
114 | ident, new_msg = self.session.recv(B) |
|
114 | ident, new_msg = self.session.recv(B) | |
115 | self.assertEqual(ident[0], b'foo') |
|
115 | self.assertEqual(ident[0], b'foo') | |
116 |
self.assertEqual(new_msg['msg_id'], |
|
116 | self.assertEqual(new_msg['msg_id'],header['msg_id']) | |
117 | self.assertEqual(new_msg['msg_type'],msg['msg_type']) |
|
117 | self.assertEqual(new_msg['msg_type'],msg['msg_type']) | |
118 | self.assertEqual(new_msg['header'],msg['header']) |
|
118 | self.assertEqual(new_msg['header'],msg['header']) | |
119 | self.assertEqual(new_msg['content'],msg['content']) |
|
119 | self.assertEqual(new_msg['content'],msg['content']) |
General Comments 0
You need to be logged in to leave comments.
Login now