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
ftest_AdminInterfaceServer.py
Go to the documentation of this file.
1 '''
2 HCE project, Python bindings, Distributed Tasks Manager application.
3 AdminInterfaceServer object functional tests.
4 
5 @package: dtm
6 @author bgv bgv.hce@gmail.com
7 @link: http://hierarchical-cluster-engine.com/
8 @copyright: Copyright © 2013-2014 IOIX Ukraine
9 @license: http://hierarchical-cluster-engine.com/license/
10 @since: 0.1
11 '''
12 
13 
14 import ConfigParser
15 
16 import dtm.AdminInterfaceServer
17 from transport.ConnectionBuilderLight import ConnectionBuilderLight
18 
19 import transport.Consts as TRANSPORT_CONSTS
20 
21 
22 if __name__ == "__main__":
23  TEST_TITLE = "Test "
24  TEST_TITLE_OBJECT = " object:\n"
25 
26  #Test TasksStateUpdateService instantiation
27  CONFIG_SECTION = "AdminInterfaceServer"
28  config = ConfigParser.RawConfigParser()
29  config.add_section(CONFIG_SECTION)
30  config.set(CONFIG_SECTION, "server", "Admin")
31  config.set(CONFIG_SECTION, "serverHost", "localhost")
32  config.set(CONFIG_SECTION, "serverPort", "5502")
33 
34  #Create instance
35  ais = dtm.AdminInterfaceServer.AdminInterfaceServer(config)
36 
37  print TEST_TITLE + ais.__class__.__name__ + TEST_TITLE_OBJECT, vars(ais)
38  ais.exit_flag = True
39