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')