def testinitconffile(self): self.assertRaises(Exception, initialization.initconffile, '/foo') # Load the standard config file. It should be OK at least. config = initialization.initconffile('conf/pygopherd.conf') assert not config.has_option("pygopherd", "servername"), \ "servername should be disabled by default" self.assertEqual(config.getint("pygopherd", "port"), 70, "Port should be 70") self.assertEqual(config.get("pygopherd", "servertype"), "ForkingTCPServer", "Servertype should be ForkingTCPServer") assert config.getboolean("pygopherd", "tracebacks"), \ "Tracebacks should be enabled."
def testinitconffile(self): self.assertRaises(Exception, initialization.initconffile, '/foo') # Load the standard config file. It should be OK at least. config = initialization.initconffile('conf/pygopherd.conf') assert not config.has_option("pygopherd", "servername"), \ "servername should be disabled by default" self.assertEqual(config.getint("pygopherd", "port"), 70, "Port should be 70") self.assertEqual(config.get("pygopherd", "servertype"), "ForkingTCPServer", "Servertype should be ForkingTCPServer") assert config.getboolean("pygopherd", "tracebacks"), \ "Tracebacks should be enabled."
def getconfig(): config = initialization.initconffile('conf/pygopherd.conf') config.set("pygopherd", "root", os.path.abspath('./testdata')) return config
def setUp(self): self.config = initialization.initconffile('conf/pygopherd.conf')
def getconfig(): config = initialization.initconffile('conf/pygopherd.conf') config.set("pygopherd", "root", os.path.abspath('./testdata')) return config
def setUp(self): self.config = initialization.initconffile('conf/pygopherd.conf')