@@ -684,59 +684,6 @@ def test_successful_validation_of_just_the_schema_pretty_output(self):
684
684
stderr = "" ,
685
685
)
686
686
687
- def test_successful_validate_with_specifying_base_uri_relative_path (self ):
688
- try :
689
- schema_file = tempfile .NamedTemporaryFile (
690
- mode = 'w+' ,
691
- prefix = 'schema' ,
692
- suffix = '.json' ,
693
- dir = '.' ,
694
- delete = False
695
- )
696
- self .addCleanup (os .remove , schema_file .name )
697
- schema = """
698
- {"type": "object", "properties": {"KEY1":
699
- {"$ref": %s%s#definitions/schemas"}},
700
- "definitions": {"schemas": {"type": "string"}}}
701
- """ % ("\" " , os .path .basename (schema_file .name ))
702
- schema_file .write (schema )
703
- finally :
704
- schema_file .close ()
705
-
706
- self .assertOutputs (
707
- files = dict (some_schema = schema , some_instance = '{"KEY1": "1"}' ),
708
- argv = ["-i" , "some_instance" , "--base-uri" , "." , "some_schema" ],
709
- stdout = "" ,
710
- stderr = "" ,
711
- )
712
-
713
- def test_failure_validate_with_specifying_base_uri_relative_path (self ):
714
- try :
715
- schema_file = tempfile .NamedTemporaryFile (
716
- mode = 'w+' ,
717
- prefix = 'schema' ,
718
- suffix = '.json' ,
719
- dir = '.' ,
720
- delete = False
721
- )
722
- self .addCleanup (os .remove , schema_file .name )
723
- schema = """
724
- {"type": "object", "properties": {"KEY1":
725
- {"$ref": %s%s#definitions/schemas"}},
726
- "definitions": {"schemas": {"type": "string"}}}
727
- """ % ("\" " , os .path .basename (schema_file .name ))
728
- schema_file .write (schema )
729
- finally :
730
- schema_file .close ()
731
-
732
- self .assertOutputs (
733
- files = dict (some_schema = schema , some_instance = '{"KEY1": 1}' ),
734
- argv = ["-i" , "some_instance" , "--base-uri" , "." , "some_schema" ],
735
- exit_code = 1 ,
736
- stdout = "" ,
737
- stderr = "1: 1 is not of type 'string'\n " ,
738
- )
739
-
740
687
def test_successful_validate_with_specifying_base_uri_absolute_path (self ):
741
688
absolute_path = os .getcwd ()
742
689
try :
0 commit comments