Skip to content

Commit

Permalink
pull requests for issue Juniper#1322 Juniper#1315
Browse files Browse the repository at this point in the history
  • Loading branch information
chidanandpujar committed Oct 14, 2024
1 parent 8e4331d commit dfeb169
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/unit/utils/test_sw.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dfeb169

Please sign in to comment.