summaryrefslogtreecommitdiffhomepage
path: root/tests/test_agent.py
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2023-04-14 12:19:40 -0400
committerJeff Forcier <jeff@bitprophet.org>2023-05-05 12:26:52 -0400
commit80556bdc9944df60eb0a06c3985bcf2dae1376e2 (patch)
tree1e922cea681f9305d58a4c59ae8663dd55e13730 /tests/test_agent.py
parent9a7ba15841f8986849a8694e9d1d7a7cd0cd6fd1 (diff)
Fix now-broken-on-py3 AgentKey.__str__, by deleting it
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)