summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2019-06-14 19:17:54 -0400
committerJeff Forcier <jeff@bitprophet.org>2019-06-14 19:17:54 -0400
commit7f3851c0fac2705b713fb6882408aa03ec8f9eb7 (patch)
treed4dd09e11585e594b7c3131accab1758a542e29e
parentc4e83b11c9d330c5f6ecdc27fb566482c855a2a7 (diff)
downloadparamiko-7f3851c0fac2705b713fb6882408aa03ec8f9eb7.tar.gz
Basic tests proving Client.exec_command returns ChannelFile instances
-rw-r--r--tests/test_client.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_client.py b/tests/test_client.py
index 9191fc01..26de2d37 100644
--- a/tests/test_client.py
+++ b/tests/test_client.py
@@ -211,6 +211,12 @@ class ClientTest(unittest.TestCase):
stdin, stdout, stderr = self.tc.exec_command("yes")
schan = self.ts.accept(1.0)
+ # Nobody else tests the API of exec_command so let's do it here for
+ # now. :weary:
+ assert isinstance(stdin, paramiko.ChannelFile)
+ assert isinstance(stdout, paramiko.ChannelFile)
+ assert isinstance(stderr, paramiko.ChannelStderrFile)
+
schan.send("Hello there.\n")
schan.send_stderr("This is on stderr.\n")
schan.close()