@@ -696,8 +696,7 @@ def test_successful_validate_with_specifying_base_uri_absolute_path(self):
696696 )
697697 self .addCleanup (os .remove , schema_file .name )
698698 schema = """
699- {"type": "object", "properties": {"KEY1":
700- {"$ref": "%s#definitions/num"}}}
699+ {"$ref": "%s#definitions/num"}
701700 """ % (os .path .basename (schema_file .name ))
702701 tmp_schema = """{"definitions": {"num": {"type": "integer"}}}"""
703702 schema_file .write (tmp_schema )
@@ -709,7 +708,7 @@ def test_successful_validate_with_specifying_base_uri_absolute_path(self):
709708 os .path .dirname (schema_file .name )
710709 )
711710 self .assertOutputs (
712- files = dict (some_schema = schema , some_instance = '{"KEY1": 1} ' ),
711+ files = dict (some_schema = schema , some_instance = '1 ' ),
713712 argv = [
714713 "-i" , "some_instance" ,
715714 "--base-uri" , absolute_dir_path ,
@@ -727,8 +726,7 @@ def test_failure_validate_with_specifying_base_uri_absolute_path(self):
727726 )
728727 self .addCleanup (os .remove , schema_file .name )
729728 schema = """
730- {"type": "object", "properties": {"KEY1":
731- {"$ref": "%s#definitions/num"}}}
729+ {"$ref": "%s#definitions/num"}
732730 """ % (os .path .basename (schema_file .name ))
733731 tmp_schema = """{"definitions": {"num": {"type": "integer"}}}"""
734732 schema_file .write (tmp_schema )
@@ -740,7 +738,7 @@ def test_failure_validate_with_specifying_base_uri_absolute_path(self):
740738 os .path .dirname (schema_file .name )
741739 )
742740 self .assertOutputs (
743- files = dict (some_schema = schema , some_instance = '{"KEY1": "1"} ' ),
741+ files = dict (some_schema = schema , some_instance = '"1" ' ),
744742 argv = [
745743 "-i" , "some_instance" ,
746744 "--base-uri" , absolute_dir_path ,
@@ -753,10 +751,9 @@ def test_failure_validate_with_specifying_base_uri_absolute_path(self):
753751
754752 def test_validate_with_specifying_invalid_base_uri (self ):
755753 schema = """
756- {"type": "object", "properties": {"KEY1":
757- {"$ref": "foo.json#definitions/num"}}}
754+ {"$ref": "foo.json#definitions/num"}
758755 """
759- instance = '{"KEY1": 1} '
756+ instance = '1 '
760757
761758 with self .assertRaises (RefResolutionError ) as e :
762759 self .assertOutputs (
0 commit comments