def test_add_usr_local_bin_raises_exception_on_failure( self, *args, **kwargs): # force an exception by removing /etc/profile.d sudo('rm -rf /etc/profile.d') with self.assertRaises(SystemExit) as cm: os_helpers.add_usr_local_bin_to_path() self.assertEqual(cm.exception.code, 1)
def test_add_usr_local_bin_raises_exception_on_failure(self, *args, **kwargs): # force an exception by removing /etc/profile.d sudo('rm -rf /etc/profile.d') with self.assertRaises(SystemExit) as cm: os_helpers.add_usr_local_bin_to_path() self.assertEqual(cm.exception.code, 1)
def test_add_user_local_bin_returns_True_on_success(self, *args, **kwargs): self.assertTrue(os_helpers.add_usr_local_bin_to_path())
def test_add_usr_local_bin_to_path_updates_PATH(self, *args, **kwargs): os_helpers.add_usr_local_bin_to_path() self.assertTrue('/usr/local/bin' in sudo('echo $PATH'))
def test_add_user_local_bin_returns_True_on_success(self, *args, **kwargs): self.assertTrue(os_helpers.add_usr_local_bin_to_path())
def test_add_usr_local_bin_to_path_updates_PATH(self, *args, **kwargs): os_helpers.add_usr_local_bin_to_path() self.assertTrue('/usr/local/bin' in sudo('echo $PATH'))