diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2023-01-12 21:17:00 -0500 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2023-01-12 21:44:59 -0500 |
commit | d04966dcec2f8e34f0ec0aea216ea098673ae90b (patch) | |
tree | e203bcda882e2b90124e209db4ffa0d5c990a516 /tests | |
parent | 714350c4dd459577898d72a59edc3213a99443d6 (diff) |
Swap around __bytes__/__str__ for some classes
Plus related updates to tests, docstrings, changelog
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_message.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_message.py b/tests/test_message.py index bd2d5795..3c5f961b 100644 --- a/tests/test_message.py +++ b/tests/test_message.py @@ -105,3 +105,9 @@ class MessageTest(unittest.TestCase): self.assertEqual(msg.get_adaptive_int(), 5) self.assertEqual(msg.get_so_far(), self.__d[:4]) self.assertEqual(msg.get_remainder(), self.__d[4:]) + + def test_bytes_str_and_repr(self): + msg = Message(self.__d) + assert str(msg) == f"paramiko.Message({self.__d!r})" + assert repr(msg) == str(msg) + assert bytes(msg) == msg.asbytes() == self.__d |