def test_config_yaml(self): import yaml cli.config(Args(), ["--format=yaml"]) data1 = yaml.safe_load(self.stdout.getvalue().strip().replace(helper.ROOT_PATH, "<ROOT>")) data2 = yaml.safe_load(config_file("data.json")) self.assertEqual(data1, data2)
def test_config_yaml(self): import yaml cli.config(Args(), ['--format=yaml']) data1 = yaml.safe_load(self.stdout.getvalue().strip().replace( helper.ROOT_PATH, '<ROOT>')) data2 = yaml.safe_load(config_file('data.json')) self.assertEqual(data1, data2)
def test_config_json(self): import json cli.config(Args(), ["--format=json"]) data1 = json.loads(self.stdout.getvalue().strip().replace(helper.ROOT_PATH, "<ROOT>")) data2 = json.loads(config_file("data.json")) self.assertEqual(data1, data2)
def test_config_json(self): import json cli.config(Args(), ['--format=json']) data1 = json.loads(self.stdout.getvalue().strip().replace( helper.ROOT_PATH, '<ROOT>')) data2 = json.loads(config_file('data.json')) self.assertEqual(data1, data2)