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
15
def
test_raise_protocol_exception_when_no_data
(self):
16
bad_msg = list()
17
with self.assertRaises(ResponseFormatErr):
18
list(
Response
(bad_msg))
19
20
21
def
test_raise_protocol_exception_too_less_data
(self):
22
bad_msg = [
"id"
]
23
with self.assertRaises(ResponseFormatErr):
24
list(
Response
(bad_msg))
25
26
27
def
test_parse_valid_msg
(self):
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"
)
transport.Response.Response
It's a wrapper similar to zmsg.hpp in sense of encapsulation of hce response message structure...
Definition:
Response.py:20
tests.test_transport_Response.TestResponse.test_parse_valid_msg
def test_parse_valid_msg(self)
Definition:
test_transport_Response.py:27
tests.test_transport_Response.TestResponse.test_raise_protocol_exception_when_no_data
def test_raise_protocol_exception_when_no_data(self)
Definition:
test_transport_Response.py:15
tests.test_transport_Response.TestResponse.test_raise_protocol_exception_too_less_data
def test_raise_protocol_exception_too_less_data(self)
Definition:
test_transport_Response.py:21
tests.test_transport_Response.TestResponse
Definition:
test_transport_Response.py:12
transport.Response
Definition:
Response.py:1
sources
hce
tests
test_transport_Response.py
Generated on Fri Nov 24 2017 18:54:03 for HCE Project Python language Distributed Tasks Manager Application, Distributed Crawler Application and client API bindings. by
1.8.13