def test_clients_conf_original(self): CP = ClientConfParser(content=CLIENT_CONF_ORIG) config = CP.get_dict() print config # {'127.0.0.1': {'secret': 'testing123', 'shortname': 'localhost', # 'nastype': 'other '}} self.assertTrue("localhost" not in config) self.assertTrue("127.0.0.1" in config) self.assertEqual(config.get("127.0.0.1").get("secret"), "testing123") self.assertEqual(config.get("127.0.0.1").get("nastype"), "other") output = CP.format(config) print output self.assertEqual(output, FILEOUTPUT_ORIG)