diff --git a/sshagent/tests/test_trezor.py b/sshagent/tests/test_trezor.py index 2464e65..ecf0323 100644 --- a/sshagent/tests/test_trezor.py +++ b/sshagent/tests/test_trezor.py @@ -42,6 +42,10 @@ class ConnectionMock(object): result.node.public_key = PUBKEY return result + def ping(self, msg): + assert not self.closed + return msg + class FactoryMock(object): diff --git a/sshagent/trezor/client.py b/sshagent/trezor/client.py index 50dd501..589e6e6 100644 --- a/sshagent/trezor/client.py +++ b/sshagent/trezor/client.py @@ -25,6 +25,8 @@ class Client(object): log.debug('revision : %s', binascii.hexlify(f.revision)) def __enter__(self): + msg = 'Hello World!' + assert self.client.ping(msg) == msg return self def __exit__(self, *args):