From 0fddf32c2dd4c23ee4152bf83b3dbcc947c36a4e Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Mon, 17 Feb 2020 12:48:04 +0000 Subject: [tests] use echo instead of py script in test_{output,shell_out}() Related: #1949 Signed-off-by: Bryn M. Reeves Signed-off-by: Jake Hunsaker --- tests/utilities_tests.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/utilities_tests.py b/tests/utilities_tests.py index f556b9a4..80cd3e68 100644 --- a/tests/utilities_tests.py +++ b/tests/utilities_tests.py @@ -56,8 +56,7 @@ class ExecutableTest(unittest.TestCase): self.assertTrue(is_executable("/usr/bin/timeout")) def test_output(self): - path = os.path.join(TEST_DIR, 'test_exe.py') - result = sos_get_command_output(path) + result = sos_get_command_output("echo executed") self.assertEquals(result['status'], 0) self.assertEquals(result['output'], "executed\n") @@ -75,8 +74,7 @@ class ExecutableTest(unittest.TestCase): self.assertEquals(result['output'].strip(), TEST_DIR) def test_shell_out(self): - path = os.path.join(TEST_DIR, 'test_exe.py') - self.assertEquals("executed\n", shell_out(path)) + self.assertEquals("executed\n", shell_out('echo executed')) class FindTest(unittest.TestCase): -- cgit