diff options
author | krishnaa96 <krishna.moorthy6@wipro.com> | 2021-09-09 16:23:17 +0530 |
---|---|---|
committer | krishnaa96 <krishna.moorthy6@wipro.com> | 2021-10-04 21:13:51 +0530 |
commit | e35d4a1b94bbcd844300282d1c3c8722ef58062d (patch) | |
tree | 1e3db2313ba02a09feb48842852c8118547072f9 /test/apps/nxi_termination/test_remote_opt_processor_termination.py | |
parent | 92373ddd2e28cc2000a2634d273836fea5d87a6e (diff) |
Support second level NSSI in terminate app
Issue-ID: OPTFRA-990
Signed-off-by: krishnaa96 <krishna.moorthy6@wipro.com>
Change-Id: If47b19d18e5eb1cbef24418c7697e0770818959f
Diffstat (limited to 'test/apps/nxi_termination/test_remote_opt_processor_termination.py')
-rw-r--r-- | test/apps/nxi_termination/test_remote_opt_processor_termination.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/test/apps/nxi_termination/test_remote_opt_processor_termination.py b/test/apps/nxi_termination/test_remote_opt_processor_termination.py index 9fbc27b..555f2e8 100644 --- a/test/apps/nxi_termination/test_remote_opt_processor_termination.py +++ b/test/apps/nxi_termination/test_remote_opt_processor_termination.py @@ -69,13 +69,13 @@ class TestRemoteOptProcessor(unittest.TestCase): exception_response_json1 = json_from_file(exception_response_file1) #nsi success scenario - self.patcher_req = patch('apps.nxi_termination.optimizers.remote_opt_processor.get_resource_count', return_value=1) + self.patcher_req = patch('apps.nxi_termination.optimizers.remote_opt_processor.get_allotted_resources', return_value=success_rel_json) self.Mock_req = self.patcher_req.start() self.assertEquals(success_output_json, process_nxi_termination_opt(request_json, osdf_config)) self.patcher_req.stop() #nsi failure scenario - self.patcher_req = patch('apps.nxi_termination.optimizers.remote_opt_processor.get_resource_count', return_value=3) + self.patcher_req = patch('apps.nxi_termination.optimizers.remote_opt_processor.get_allotted_resources', return_value=failure_rel_json) self.Mock_req = self.patcher_req.start() self.assertEquals(nxi_failure_output_json1, process_nxi_termination_opt(request_json, osdf_config)) self.patcher_req.stop() @@ -83,18 +83,12 @@ class TestRemoteOptProcessor(unittest.TestCase): request_json["requestInfo"]["addtnlArgs"] = {} #nsi success scenario - self.patcher_req = patch('apps.nxi_termination.optimizers.remote_opt_processor.get_resource_count', - return_value=0) + self.patcher_req = patch('apps.nxi_termination.optimizers.remote_opt_processor.get_allotted_resources', + return_value=[]) self.Mock_req = self.patcher_req.start() self.assertEquals(success_output_json, process_nxi_termination_opt(request_json, osdf_config)) self.patcher_req.stop() - # nsi failure scenario - self.patcher_req = patch('apps.nxi_termination.optimizers.remote_opt_processor.get_resource_count', - return_value=1) - self.Mock_req = self.patcher_req.start() - self.assertEquals(nxi_failure_output_json2, process_nxi_termination_opt(request_json, osdf_config)) - self.patcher_req.stop() # # # nssi success scenario self.patcher_req = patch('apps.nxi_termination.optimizers.remote_opt_processor.get_resource_count', return_value=1) |