HCE Project Python language Distributed Tasks Manager Application, Distributed Crawler Application and client API bindings.  2.0.0-chaika
Hierarchical Cluster Engine Python language binding
test_transport_Response.py
Go to the documentation of this file.
1 '''
2 Created on Feb 5, 2014
3 
4 @author: igor
5 '''
6 import unittest
7 from transport.Response import Response
8 from transport.Response import ResponseFormatErr
9 
10 
11 
12 class TestResponse(unittest.TestCase):
13 
14 
16  bad_msg = list()
17  with self.assertRaises(ResponseFormatErr):
18  list(Response(bad_msg))
19 
20 
22  bad_msg = ["id"]
23  with self.assertRaises(ResponseFormatErr):
24  list(Response(bad_msg))
25 
26 
28  msg = ["id", "body"]
29  response = Response(msg)
30  self.assertEqual(response.get_uid(), "id", "doesn't correct parse uid")
31  self.assertEqual(response.get_body(), "body", "doesn't correct parse body")
It's a wrapper similar to zmsg.hpp in sense of encapsulation of hce response message structure...
Definition: Response.py:20