Commit 13afbf86 authored by Jérome Perrin's avatar Jérome Perrin

fixup! test_json_schema: resolve `request` and `response` schemas

use six for python3 compatibility
parent fe89f1e6
......@@ -25,14 +25,16 @@
#
##############################################################################
import unittest
import os
import collections
import glob
import json
import collections
import slapos.test
import os
import unittest
import jsonschema
import six
import slapos.test
def createInstanceParameterSchemaValidatorTest(path):
# Test that json is a valid json schema, supports several
......@@ -65,7 +67,7 @@ def createSoftwareCfgValidatorTest(path, software_cfg_schema):
# also make sure request and response schemas can be resolved
schema.setdefault('$id', 'file://' + path)
resolver = jsonschema.RefResolver.from_schema(schema)
for software_type_definition in schema['software-type'].itervalues():
for software_type_definition in six.itervalues(schema['software-type']):
resolver.resolve(software_type_definition['request'])
resolver.resolve(software_type_definition['response'])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment