def main(): """Install packages considered necessary to build software""" if is_debian() or is_ubuntu(): apt_get = APTGet() apt_get.install('build-essential') else: # FIXME: we need to support other distros soon pass
def test_apt_get_install_no_items_fails(self): with patch('genes.process.process.Popen') as mock_popen: apt_get = APTGet() with self.assertRaises(ValueError): apt_get.install() mock_popen.assert_not_called()
def test_apt_get_upgrade_with_no_items_calls_popen(self): with patch('genes.process.process.Popen') as mock_popen: apt_get = APTGet() apt_get.upgrade() mock_popen.assert_called_once_with(('apt-get', '-y', 'upgrade'))
def test_apt_get_install_multiple_items_calls_popen(self): with patch('genes.process.process.Popen') as mock_popen: apt_get = APTGet() apt_get.install('test1', 'test2') mock_popen.assert_called_once_with(('apt-get', '-y', 'install', 'test1', 'test2'))
def __init__(self): if not APTPkg.is_installed("software-properties-common"): apt_get = APTGet() apt_get.update() apt_get.install("software-properties-common")