+ def test_req_vfmod_validation(self):
+ req_file = "./test/placement-tests/request_vfmod.json"
+ req_json = json.loads(open(req_file).read())
+ self.assertEqual(PlacementAPI(req_json).validate(), None)
+
+ def test_req_nsi_validation(self):
+ req_file = "./test/apps/slice_selection/nsi_selection_request.json"
+ req_json = json.loads(open(req_file).read())
+ self.assertEqual(NSISelectionAPI(req_json).validate(), None)
+
+ def test_req_invalid_nsi(self):
+ req_file = "./test/apps/slice_selection/nsi_selection_invalid_request.json"
+ req_json = json.loads(open(req_file).read())
+ self.assertRaises(DataError, lambda: NSISelectionAPI(req_json).validate())
+
+ def test_req_nssi_validation(self):
+ req_file = "./test/apps/slice_selection/nssi_selection_request.json"
+ req_json = json.loads(open(req_file).read())
+ self.assertEqual(NSSISelectionAPI(req_json).validate(), None)
+
+ def test_req_invalid_nssi(self):
+ req_file = "./test/apps/slice_selection/nssi_selection_invalid_request.json"
+ req_json = json.loads(open(req_file).read())
+ self.assertRaises(DataError, lambda: NSSISelectionAPI(req_json).validate())
+