Exemple #1
0
 def test_shell_fail_as_expected(self):
     try:
         rc = shell("ls", "/root")
     except RuntimeError:
         pass
Exemple #2
0
 def test_shell_success(self):
     if os.path.exists("/dev") and os.path.exists("/dev/null"):
         self.assertEquals(shell("echo ok > /dev/null"), 0)
         self.assertEquals(shell("ls null", "/dev"), 0)
         self.assertEquals(shell("ls null", "/dev", dryrun=True), 0)