Esempio n. 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
Esempio n. 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
Esempio n. 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
Esempio n. 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
Esempio n. 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
Esempio n. 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