diff options
-rwxr-xr-x | systest | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -52,7 +52,9 @@ class SystemTest(cliapp.Application): return methodname.replace('_', '-') def hostcmd(self, argv, stdin=None): - p = subprocess.Popen(argv, stdout=subprocess.PIPE, + p = subprocess.Popen(argv, + stdin=subprocess.PIPE, + stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = p.communicate(stdin) if p.returncode: @@ -106,6 +108,10 @@ class SystemTest(cliapp.Application): def test_ping_localhost_using_ipv6(self): self.targetcmd(['ping6', '-c1', 'ip6-localhost']) + + def test_cat_works(self): + out = self.targetcmd(['cat'], stdin='foo') + self.assertEqual(out, 'foo') # def test_sudo_works(self): # out = self.targetcmd(['sudo', 'id'], stdin=self.password) |