Example #1
0
 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."
Example #2
0
 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."
Example #3
0
def getconfig():
    config = initialization.initconffile('conf/pygopherd.conf')
    config.set("pygopherd", "root", os.path.abspath('./testdata'))
    return config
Example #4
0
 def setUp(self):
     self.config = initialization.initconffile('conf/pygopherd.conf')
Example #5
0
def getconfig():
    config = initialization.initconffile('conf/pygopherd.conf')
    config.set("pygopherd", "root", os.path.abspath('./testdata'))
    return config
Example #6
0
 def setUp(self):
     self.config = initialization.initconffile('conf/pygopherd.conf')