summaryrefslogtreecommitdiffhomepage
path: root/tests/test_agent.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_agent.py')
-rw-r--r--tests/test_agent.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_agent.py b/tests/test_agent.py
index 01602d0e..a00011bf 100644
--- a/tests/test_agent.py
+++ b/tests/test_agent.py
@@ -48,3 +48,10 @@ class AgentTests(unittest.TestCase):
kwargs=dict(algorithm="rsa-sha2-512"),
expectation=SSH_AGENT_RSA_SHA2_512,
)
+
+ def test_agent_key_str_kinda_fixed(self):
+ # Tests for a missed spot in Python 3 upgrades: AgentKey.__str__ was
+ # returning bytes, as if under Python 2. When bug present, this
+ # explodes with "__str__ returned non-string".
+ key = AgentKey(ChaosAgent(), b("secret!!!"))
+ assert str(key) == repr(key)