Remove BIN_FALSE and BIN_TRUE

https://fedorahosted.org/freeipa/ticket/6474

Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
This commit is contained in:
Christian Heimes
2016-12-01 14:49:14 +01:00
committed by Petr Vobornik
parent fb307ba582
commit 3e3b5462b2
2 changed files with 4 additions and 6 deletions

View File

@@ -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"

View File

@@ -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)