6 from jsonschema
import validate
9 class ExamplesTest(unittest
.TestCase
):
10 def test_examples_schema(self
):
11 # TODO: Test that valid examples correspond to schema.
12 # This forces the modification of the examples in case of schema changes.
13 example_file_path
= os
.path
.join(os
.path
.dirname(__file__
), './examples/configure_scaling_full_example.json')
14 schema_file_path
= os
.path
.join(os
.path
.dirname(__file__
), '../models/configure_scaling.json')
15 with
open(example_file_path
) as example_file
, open(schema_file_path
) as schema_file
:
16 validate(json
.load(example_file
), json
.load(schema_file
))
19 if __name__
== '__main__':