From 7f3851c0fac2705b713fb6882408aa03ec8f9eb7 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Jun 2019 19:17:54 -0400 Subject: Basic tests proving Client.exec_command returns ChannelFile instances --- tests/test_client.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') 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() -- cgit v1.2.3