diff --git a/tests/unit/utils/test_sw.py b/tests/unit/utils/test_sw.py index ad6cc773b..2796d8a4c 100644 --- a/tests/unit/utils/test_sw.py +++ b/tests/unit/utils/test_sw.py @@ -242,12 +242,36 @@ def test_sw_install_issu(self, mock_execute): package = "test.tgz" self.assertTrue(self.sw.install(package, issu=True, no_copy=True)) + @patch("jnpr.junos.Device.execute") + def test_sw_install_issu_validate_False(self, mock_execute): + mock_execute.side_effect = self._mock_manager + package = "test.tgz" + self.assertTrue(self.sw.install(package, issu=True, no_copy=True, validate=False)) + + @patch("jnpr.junos.Device.execute") + def test_sw_install_issu_validate_True(self, mock_execute): + mock_execute.side_effect = self._mock_manager + package = "test.tgz" + self.assertTrue(self.sw.install(package, issu=True, no_copy=True, validate=True)) + @patch("jnpr.junos.Device.execute") def test_sw_install_nssu(self, mock_execute): mock_execute.side_effect = self._mock_manager package = "test.tgz" self.assertTrue(self.sw.install(package, nssu=True, no_copy=True)) + @patch("jnpr.junos.Device.execute") + def test_sw_install_nssu_validate_False(self, mock_execute): + mock_execute.side_effect = self._mock_manager + package = "test.tgz" + self.assertTrue(self.sw.install(package, nssu=True, no_copy=True, validate=False)) + + @patch("jnpr.junos.Device.execute") + def test_sw_install_nssu_validate_True(self, mock_execute): + mock_execute.side_effect = self._mock_manager + package = "test.tgz" + self.assertTrue(self.sw.install(package, nssu=True, no_copy=True, validate=True)) + @patch("jnpr.junos.Device.execute") def test_sw_install_issu_nssu_both_error(self, mock_execute): mock_execute.side_effect = self._mock_manager