def test_install(install_var): """ Test - Install packages. """ with patch("salt.modules.aptpkg.install", MagicMock(return_value=install_var)): assert aptpkg.install(name="tmux") == install_var kwargs = {"force_conf_new": True} assert aptpkg.install(name="tmux", **kwargs) == install_var
def test_install(self): """ Test - Install packages. """ with patch("salt.modules.aptpkg.install", MagicMock(return_value=INSTALL)): self.assertEqual(aptpkg.install(name="tmux"), INSTALL) kwargs = {"force_conf_new": True} self.assertEqual(aptpkg.install(name="tmux", **kwargs), INSTALL)