diff options
author | Shankaranarayanan Puzhavakath Narayanan <snarayanan@research.att.com> | 2019-04-20 17:03:04 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-04-20 17:03:04 +0000 |
commit | 9eadcba0fa858a031f6269fc127c9dc738bb7d8b (patch) | |
tree | 88b0226afa174c77c59cbfda35ca092774518f6e /test/test_api_validation.py | |
parent | e1f6d80752920a7ef990134f02abb3db9b5a6232 (diff) | |
parent | fc3ead31e631f69fabf0baaa20c10bf955ce374b (diff) |
Merge "Traffic Distributtion support added"
Diffstat (limited to 'test/test_api_validation.py')
-rw-r--r-- | test/test_api_validation.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test_api_validation.py b/test/test_api_validation.py index 80e0ba0..389ff62 100644 --- a/test/test_api_validation.py +++ b/test/test_api_validation.py @@ -30,6 +30,11 @@ class TestReqValidation(unittest.TestCase): req_json = json.loads(open(req_file).read()) self.assertEqual(PlacementAPI(req_json).validate(), None) + 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_failure(self): req_json = {} self.assertRaises(ModelValidationError, lambda: PlacementAPI(req_json).validate()) @@ -42,6 +47,11 @@ class TestResponseValidation(unittest.TestCase): req_json = json.loads(open(req_file).read()) self.assertEqual(PlacementResponse(req_json).validate(), None) + def test_res_vfmod_validation(self): + req_file = "./test/placement-tests/response_vfmod.json" + req_json = json.loads(open(req_file).read()) + self.assertEqual(PlacementResponse(req_json).validate(), None) + def test_invalid_response(self): resp_json = {} self.assertRaises(ModelValidationError, lambda: PlacementResponse(resp_json).validate()) |