def test_terminate(self, ssh, mock_socket, mock_time): mock_ssh(ssh) vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] prox_traffic_gen = ProxTrafficGen(NAME, vnfd) prox_traffic_gen._terminated = mock.MagicMock() prox_traffic_gen._traffic_process = mock.MagicMock() prox_traffic_gen._traffic_process.terminate = mock.Mock() prox_traffic_gen.ssh_helper = mock.MagicMock() prox_traffic_gen.setup_helper = mock.MagicMock() prox_traffic_gen.resource_helper = mock.MagicMock() self.assertEqual(None, prox_traffic_gen.terminate())
def test_terminate(self, ssh, *args): mock_ssh(ssh) vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] prox_traffic_gen = ProxTrafficGen(NAME, vnfd) prox_traffic_gen._terminated = mock.MagicMock() prox_traffic_gen._traffic_process = mock.MagicMock() prox_traffic_gen._traffic_process.terminate = mock.Mock() prox_traffic_gen.ssh_helper = mock.MagicMock() prox_traffic_gen.setup_helper = mock.MagicMock() prox_traffic_gen.resource_helper = mock.MagicMock() prox_traffic_gen._vnf_wrapper.setup_helper = mock.MagicMock() prox_traffic_gen._vnf_wrapper._vnf_process = mock.MagicMock() prox_traffic_gen._vnf_wrapper.resource_helper = mock.MagicMock() self.assertIsNone(prox_traffic_gen.terminate())