コード例 #1
0
 def test_check_wrong_schema_1(self):
     schema = load_json(
         self.get_project_data_file("vrp_solution_schema.json"))
     del schema['properties']['routes']['items']['required']
     sm = SchemaManager(schema)
     val = sm.validate_schema()
     self.assertFalse(val)
コード例 #2
0
 def test_check_wrong_schema_2(self):
     schema = load_json(
         self.get_project_data_file("vrp_solution_schema.json"))
     schema['properties']['routes']['items']['properties']['pos'][
         'type'] = 'not_a_type'
     sm = SchemaManager(schema)
     val = sm.validate_schema()
     self.assertFalse(val)
コード例 #3
0
 def test_check_wrong_schema_3(self):
     schema = load_json(
         self.get_project_data_file("vrp_solution_schema.json"))
     del schema["properties"]["routes"]["items"]["properties"]["pos"][
         "type"]
     sm = SchemaManager(schema)
     val = sm.validate_schema()
     self.assertFalse(val)