Skip to content

Commit

Permalink
Correct test description and add explicit encoding
Browse files Browse the repository at this point in the history
Python 2 defaults to 'ascii' rather than 'utf-8 as used in Python 3, so
needs explicit setting.
  • Loading branch information
tofu-rocketry committed Feb 6, 2024
1 parent 33d8477 commit 1d340d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test_ssm.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ def test_on_message(self):
test_ssm.on_message({'empa-id': '012345'}, 'body')

def test_str_bytes_outgoing(self):
"""Test to ensure that outgoing messages are converted from Bytes to Str"""
"""Test to ensure that incoming messages are converted from Bytes to Str"""
test_ssm = Ssm2(self._brokers, self._msgdir, TEST_CERT_FILE,
self._key_path, dest=self._dest, listen=self._listen)

message = "Appelle Hippocampéléphantocamélos"
byte_message = message.encode()
byte_message = message.encode('utf-8')
test_ssm.on_message({'empa-id': '012345'}, byte_message)

def test_init_expired_cert(self):
Expand Down

0 comments on commit 1d340d1

Please sign in to comment.