Esempio n. 1
0
    def test_20_init___w_config_file(self):
        open(self.conf, 'w').write(_CONF_0)

        cfg = TT.init(self.conf)
        self.assertTrue(isinstance(cfg, dict))

        for k in _CONF_KEYS:
            self.assertTrue(k in cfg)

        self.assertEquals(cfg["hostname"], "yumrepos.example.local")
        self.assertEquals(cfg["altname"], "yumrepos.example.com")
        self.assertEquals(cfg["dists"],
                          "fedora-19-x86_64,fedora-19-i386,rhel-6-x86_64")