diff options
author | hariharan97 <rh20085046@wipro.com> | 2020-08-26 09:42:29 +0530 |
---|---|---|
committer | hariharan97 <rh20085046@wipro.com> | 2020-09-02 17:38:41 +0530 |
commit | 7b7cfac3d2ae636f63c0e94df1a7129f2d10cb54 (patch) | |
tree | aefbb5da4319a5fe3bc7b4a2c8d6b2156201038b /test/test_api_validation.py | |
parent | 053c09a2ed1a8fc8aeef3f8185902634feec8000 (diff) |
Add Nxi-Termination feature
Issue-ID: OPTFRA-825
Signed-off-by: hariharan97 <rh20085046@wipro.com>
Change-Id: I0d768e36708e9f26e5bcdf661b2bcb5772ed48c2
Diffstat (limited to 'test/test_api_validation.py')
-rw-r--r-- | test/test_api_validation.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test_api_validation.py b/test/test_api_validation.py index 37f1321..3a20262 100644 --- a/test/test_api_validation.py +++ b/test/test_api_validation.py @@ -24,6 +24,7 @@ from apps.placement.models.api.placementRequest import PlacementAPI from apps.placement.models.api.placementResponse import PlacementResponse from apps.slice_selection.models.api.nsi_selection_request import NSISelectionAPI from apps.slice_selection.models.api.nssi_selection_request import NSSISelectionAPI +from apps.nxi_termination.models.api.nxi_termination_request import NxiTerminationApi class TestReqValidation(unittest.TestCase): @@ -62,6 +63,16 @@ class TestReqValidation(unittest.TestCase): req_json = {} self.assertRaises(DataError, lambda: PlacementAPI(req_json).validate()) + def test_req_nxi_validation(self): + req_file = "./test/apps/nxi_termination/nxi_termination.json" + req_json = json.loads(open(req_file).read()) + self.assertEqual(NxiTerminationApi(req_json).validate(), None) + + def test_req_invalid_nxi(self): + req_file = "./test/apps/nxi_termination/invalid_request.json" + req_json = json.loads(open(req_file).read()) + self.assertRaises(DataError, lambda: NxiTerminationApi(req_json).validate()) + class TestResponseValidation(unittest.TestCase): |