diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2020-02-17 12:48:04 +0000 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2020-02-26 10:16:49 -0500 |
commit | 0fddf32c2dd4c23ee4152bf83b3dbcc947c36a4e (patch) | |
tree | bd51b23e3d01195d5b28d6a0f2913e7478da38ed | |
parent | f13dd77d50922857d391c305762df643d8a0fa44 (diff) | |
download | sos-0fddf32c2dd4c23ee4152bf83b3dbcc947c36a4e.tar.gz |
[tests] use echo instead of py script in test_{output,shell_out}()
Related: #1949
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r-- | tests/utilities_tests.py | 6 |
1 files changed, 2 insertions, 4 deletions
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): |