Fixes bugs for integration with MON module
[osm/MON.git] / policy_module / osm_policy_module / tests / unit / test_examples.py
1 import json
2 import unittest
3
4 import os
5
6 from jsonschema import validate
7
8
9 class ExamplesTest(unittest.TestCase):
10 def test_examples_schema(self):
11 example_file_path = os.path.join(os.path.dirname(__file__), '../examples/configure_scaling_full_example.json')
12 schema_file_path = os.path.join(os.path.dirname(__file__), '../../models/configure_scaling.json')
13 with open(example_file_path) as example_file, open(schema_file_path) as schema_file:
14 validate(json.load(example_file), json.load(schema_file))
15
16
17 if __name__ == '__main__':
18 unittest.main()