Fix calling fuelclient during tests

Instead of building path to 'fuel' executable (which
causes issues on CI server) simply call 'fuel' since it is added
to PATH in tox environment.

Change-Id: I14a3c42fac084d7b3d6cb9b26e9c4f23ec60b02b
This commit is contained in:
Sebastian Kalinowski
2015-01-20 15:22:54 +01:00
parent 52aaa2d435
commit 16f350cb68

View File

@@ -63,22 +63,10 @@ class UnitTestCase(TestCase):
class BaseTestCase(UnitTestCase):
root_path = os.path.abspath(
os.path.join(
os.curdir,
os.path.pardir
)
)
nailgun_root = os.environ.get('NAILGUN_ROOT', '/tmp/fuel_web/nailgun')
manage_path = os.path.join(nailgun_root, 'manage.py')
fuel_path = os.path.join(
root_path,
"python-fuelclient/fuel"
)
def setUp(self):
self.reload_nailgun_server()
self.temp_directory = tempfile.mkdtemp()
@@ -118,7 +106,7 @@ class BaseTestCase(UnitTestCase):
def run_cli_command(self, command_line, check_errors=False):
modified_env = os.environ.copy()
command_args = [" ".join((self.fuel_path, command_line))]
command_args = [" ".join(('fuel', command_line))]
process_handle = subprocess.Popen(
command_args,
stdout=subprocess.PIPE,