def testDumpConfig(self):
        conf = confighelper.parse(self.json)
        sink = 'a.json'
        confighelper.dump(conf, sink)

        dumped = confighelper.parse(sink)

        assert dumped['custom'] == conf['custom']
        assert 'users' in dumped

        os.remove(sink)
Exemplo n.º 2
0
    def testDumpConfig(self):
        conf = confighelper.parse(self.json)
        sink = 'a.json'
        confighelper.dump(conf, sink)

        dumped = confighelper.parse(sink)

        assert dumped['custom'] == conf['custom']
        assert 'users' in dumped

        os.remove(sink)
 def testDumpConfigBadFileType(self):
     with self.assertRaises(ValueError):
         confighelper.dump({}, 'foo.whatever')
Exemplo n.º 4
0
 def testDumpConfigBadFileType(self):
     with self.assertRaises(ValueError):
         confighelper.dump({}, 'foo.whatever')