From 0a849deb13d147d5522c7738a183f7fedfa956fd Mon Sep 17 00:00:00 2001 From: Tasos Papaioannou Date: Thu, 11 Apr 2024 12:19:43 -0400 Subject: [PATCH] Test remove fix. --- robottelo/cli/base.py | 2 +- tests/robottelo/test_cli.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/robottelo/cli/base.py b/robottelo/cli/base.py index d276cd741fa..8d258500b27 100644 --- a/robottelo/cli/base.py +++ b/robottelo/cli/base.py @@ -200,7 +200,7 @@ def execute( command, ) response = ssh.command( - cmd, + cmd.encode('utf-8'), hostname=hostname or cls.hostname or settings.server.hostname, output_format=output_format, timeout=timeout, diff --git a/tests/robottelo/test_cli.py b/tests/robottelo/test_cli.py index e6d6de2dd7b..a2568f5a584 100644 --- a/tests/robottelo/test_cli.py +++ b/tests/robottelo/test_cli.py @@ -258,7 +258,7 @@ def test_execute_with_raw_response(self, settings, command): response = Base.execute('some_cmd', return_raw_response=True) ssh_cmd = 'LANG=en_US hammer -v -u admin -p password some_cmd' command.assert_called_once_with( - ssh_cmd, + ssh_cmd.encode('utf-8'), hostname=mock.ANY, output_format=None, timeout=None, @@ -277,7 +277,7 @@ def test_execute_with_performance(self, settings, command, handle_resp): response = Base.execute('some_cmd', hostname=None, output_format='json') ssh_cmd = 'LANG=en_US time -p hammer -v -u admin -p password --output=json some_cmd' command.assert_called_once_with( - ssh_cmd, + ssh_cmd.encode('utf-8'), hostname=mock.ANY, output_format='json', timeout=None,