Exemple #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
Exemple #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
Exemple #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
Exemple #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
Exemple #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
Exemple #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