test lsof on real output
@@ -14,6 +14,7 @@ import pytest
from moler.cmd.unix.ls import Ls
from moler.cmd.unix.ping import Ping
from moler.cmd.unix.whoami import Whoami
+from moler.cmd.unix.lsof import Lsof
from moler.exceptions import CommandTimeout
from moler.io.raw.terminal import ThreadedTerminal
@@ -71,6 +72,13 @@ def test_terminal_whoami_ls(terminal_connection):
assert getpass.getuser() == user2
+def test_terminal_lsof(terminal_connection):
+ terminal = terminal_connection
+ cmd = Lsof(connection=terminal)
+ ret = cmd()
+ assert ret["NUMBER"] > 1
+
+
@pytest.yield_fixture()
def terminal_connection():
from moler.connection import ObservableConnection
