def test_do_upgrade(self, system_mock): do_upgrade() system_mock.assert_called_once_with('nohup bash -c "sudo apt-get update && sudo apt-get dist-upgrade" > /var/log/fabscanpi/upgrade.log')
def update_server(self): try: do_upgrade() except StandardError, e: self._logger.error(e)