コード例 #1
0
 def test_start_EDNA_server(self):
     # Read test data - note that this depends on the system
     strPathToConfigFile = "../config/%s.xml" % socket.gethostname()
     if not os.path.exists(strPathToConfigFile):
         raise BaseException("Cannot find configuration file: %s" % strPathToConfigFile)
     print "Using configuration file: %s" % os.path.abspath(strPathToConfigFile)
     with open(strPathToConfigFile) as f:
         strXmlConfig = f.read()
         config = DASConfig.parseString(strXmlConfig)
         serverControl = ServerControl()
         serverControl.startServer(config.EDNA)