示例#1
0
 def test_validate_yaml_with_good_json_input(self):
     """
     YAML is technically a superset of json, ie valid json == valid yaml
     """
     with open(os.path.join(test_resources, 'good.json'), 'r') as f:
         _ = YAML.is_it(f)
         assert _ == True
示例#2
0
 def test_validate_yaml_with_good_json_input(self):
     """
     YAML is technically a superset of json, ie valid json == valid yaml
     """
     with open(os.path.join(test_resources, 'good.json'), 'r') as f:
         _ = YAML.is_it(f)
         assert _ == True
示例#3
0
 def test_validate_yaml_with_bad_json_input(self):
     with open(os.path.join(test_resources, 'bad.json'), 'r') as f:
         _ = YAML.is_it(f)
         assert _ == False
示例#4
0
 def test_validate_yaml_bad(self):
     with open(os.path.join(test_resources, 'bad.yaml'), 'r') as f:
         _ = YAML.is_it(f)
         assert _ == False
示例#5
0
 def test_validate_yaml_with_bad_json_input(self):
     with open(os.path.join(test_resources, 'bad.json'), 'r') as f:
         _ = YAML.is_it(f)
         assert _ == False
示例#6
0
 def test_validate_yaml_bad(self):
     with open(os.path.join(test_resources, 'bad.yaml'), 'r') as f:
         _ = YAML.is_it(f)
         assert _ == False