def testInit(self): #init the server conf conf = ServerConf(confdir=self.confDir) self.assertEquals(conf.get('conf_dir'),self.confDir) self.assertEquals(self.confFile,conf.get('conf_file')) conf.getServerKeyDir() #just to make sure it has been initiated the proper way conf.setServerHost("testhost") conf2 = ServerConf(confdir = self.confDir) #creating a new instance reinitiates the config and reads parameters from config file self.assertEquals('testhost',conf2.get('server_host'))
def testInit(self): #init the server conf conf = ServerConf(confdir=self.confDir) self.assertEquals(conf.get('conf_dir'), self.confDir) self.assertEquals(self.confFile, conf.get('conf_file')) conf.getServerKeyDir( ) #just to make sure it has been initiated the proper way conf.setServerHost("testhost") conf2 = ServerConf( confdir=self.confDir ) #creating a new instance reinitiates the config and reads parameters from config file self.assertEquals('testhost', conf2.get('server_host'))