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_IDGenerator.py
Go to the documentation of this file.
1 '''
2 Created on Feb 4, 2014
3 
4 @author: igor
5 '''
6 import unittest
7 from transport.IDGenerator import IDGenerator
8 
9 class TestIDGenerator(unittest.TestCase):
10 
11  def setUp(self):
12  unittest.TestCase.setUp(self)
14 
15 
17  expect_id = ["1", "2", "3", "4"]
18  result = list()
19  for _ in xrange(0, 4):
20  result.append(self.idGenerator.get_connection_uid(type=1))
21 
22  self.assertEqual(expect_id, result, "generation connection ids is broken")
IDGenerator is used to generate unique id for connections.
Definition: IDGenerator.py:15