From: Michael Tremer Date: Thu, 21 Jul 2022 08:32:02 +0000 (+0000) Subject: tests: execute: Replace former dummy commands X-Git-Tag: 0.9.28~659 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29c11461cef35655498f83e5f8713fac40dd3112;p=pakfire.git tests: execute: Replace former dummy commands Signed-off-by: Michael Tremer --- diff --git a/tests/python/execute.py b/tests/python/execute.py index 6cb10e9eb..22dfe898a 100755 --- a/tests/python/execute.py +++ b/tests/python/execute.py @@ -38,30 +38,30 @@ class Test(unittest.TestCase): def test_invalid_inputs(self): # Arguments with self.assertRaises(TypeError): - self.pakfire.execute("/usr/bin/sleep") + self.pakfire.execute("/command") with self.assertRaises(TypeError): - self.pakfire.execute(["/usr/bin/sleep", 1]) + self.pakfire.execute(["/command", 1]) with self.assertRaises(TypeError): - self.pakfire.execute(("/usr/bin/sleep", "--help")) + self.pakfire.execute(("/command", "--help")) # Environment with self.assertRaises(TypeError): - self.pakfire.execute(["/usr/bin/sleep", "--help"], environ={"VAR1" : 1}) + self.pakfire.execute(["/command", "--help"], environ={"VAR1" : 1}) with self.assertRaises(TypeError): - self.pakfire.execute(["/usr/bin/sleep", "--help"], environ={1 : "VAL1"}) + self.pakfire.execute(["/command", "--help"], environ={1 : "VAL1"}) with self.assertRaises(TypeError): - self.pakfire.execute(["/usr/bin/sleep", "--help"], environ="VAR1=VAL1") + self.pakfire.execute(["/command", "--help"], environ="VAR1=VAL1") def test_execute_non_existant_command(self): """ Executing non-existant commands should raise an error """ with self.assertRaises(pakfire.CommandExecutionError): - self.pakfire.execute(["/usr/bin/does-not-exist"]) + self.pakfire.execute(["/command-does-not-exist"]) def test_execute_output(self): self.pakfire.execute(["/command", "echo", "123"])