def test_apt_get_update_calls_popen(self): with patch('genes.process.process.Popen') as mock_popen: apt_get = APTGet() apt_get.update() mock_popen.assert_called_once_with(('apt-get', '-y', 'update'))
def __init__(self): if not APTPkg.is_installed("software-properties-common"): apt_get = APTGet() apt_get.update() apt_get.install("software-properties-common")