Exemplo n.º 1
0
Arquivo: test.py Projeto: ILJICH/PyBd
class ConfigTest(TestCase):
    def setUp(self):
        f = open(dirname(__file__) + "/test.conf")
        self.c = ConfigReader(f.read())
        f.close()

    def test_config(self):
        self.assertEqual(self.c["none"], None)
        self.assertEqual(self.c["device"]["none"], None)

    def test_split(self):
        handler_header, expressions =  self.c["expressions"]["default"].items()[0]
        handler, params = self.c.split_header(handler_header)
        self.assertEqual(params["user"], "iljich")
        self.assertEqual(params["none"], None)
        self.assertEqual(handler, "shell")
Exemplo n.º 2
0
Arquivo: test.py Projeto: ILJICH/PyBd
 def setUp(self):
     f = open(dirname(__file__) + "/test.conf")
     self.c = ConfigReader(f.read())
     f.close()