From 3e3b5462b28f2133fd4170645cad762c0a0fbb4f Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Thu, 1 Dec 2016 14:49:14 +0100 Subject: Remove BIN_FALSE and BIN_TRUE https://fedorahosted.org/freeipa/ticket/6474 Signed-off-by: Christian Heimes Reviewed-By: Stanislav Laznicka --- ipaplatform/base/paths.py | 2 -- ipatests/test_ipalib/test_errors.py | 8 ++++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ipaplatform/base/paths.py b/ipaplatform/base/paths.py index 9942fc143..f85a2aa12 100644 --- a/ipaplatform/base/paths.py +++ b/ipaplatform/base/paths.py @@ -24,13 +24,11 @@ This base platform module exports default filesystem paths. class BasePathNamespace(object): BASH = "/bin/bash" - BIN_FALSE = "/bin/false" BIN_HOSTNAMECTL = "/bin/hostnamectl" LS = "/bin/ls" SH = "/bin/sh" SYSTEMCTL = "/bin/systemctl" TAR = "/bin/tar" - BIN_TRUE = "/bin/true" AUTOFS_LDAP_AUTH_CONF = "/etc/autofs_ldap_auth.conf" ETC_DIRSRV = "/etc/dirsrv" DS_KEYTAB = "/etc/dirsrv/ds.keytab" diff --git a/ipatests/test_ipalib/test_errors.py b/ipatests/test_ipalib/test_errors.py index 43cd92654..893a3e9b9 100644 --- a/ipatests/test_ipalib/test_errors.py +++ b/ipatests/test_ipalib/test_errors.py @@ -32,7 +32,6 @@ import six from ipatests.util import assert_equal, raises from ipalib import errors -from ipaplatform.paths import paths from ipalib.constants import TYPE_ERROR if six.PY3: @@ -115,10 +114,11 @@ class test_SubprocessError(PrivateExceptionTester): """ Test the `ipalib.errors.SubprocessError.__init__` method. """ - inst = self.new(returncode=1, argv=(paths.BIN_FALSE,)) + bin_false = '/bin/false' + inst = self.new(returncode=1, argv=(bin_false,)) assert inst.returncode == 1 - assert inst.argv == (paths.BIN_FALSE,) - assert str(inst) == "return code 1 from ('/bin/false',)" + assert inst.argv == (bin_false,) + assert str(inst) == "return code 1 from ('{}',)".format(bin_false) assert inst.message == str(inst) -- cgit