]> git.ipfire.org Git - pakfire.git/commitdiff
tests: execute: Replace former dummy commands
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 21 Jul 2022 08:32:02 +0000 (08:32 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 21 Jul 2022 08:32:02 +0000 (08:32 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
tests/python/execute.py

index 6cb10e9eb1a0bc4a0407b752718aad303c121da3..22dfe898aed09dcb665029fdbeedbe405ea33224 100755 (executable)
@@ -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"])