Skip to content

Commit

Permalink
included test for deprecated method message_verify(), to make sure de…
Browse files Browse the repository at this point in the history
…precation warning is properly used
  • Loading branch information
gruenwaldi committed Dec 22, 2023
1 parent dab3326 commit 43f7659
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_ubirch_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,3 +296,11 @@ def _verify(self, uuid: UUID, message: bytes, signature: bytes) -> bytes:
self.assertEqual(expectedPubKey, payload[b'pubKeyId'])
self.assertEqual( 1574329437, payload[b'validNotAfter'])
self.assertEqual( 1542793437, payload[b'validNotBefore'])

def test_verify_signed_message_deprecated_method(self):
p = Protocol()
unpacked = p.message_verify(bytes(EXPECTED_SIGNED))
self.assertEqual(SIGNED, unpacked[0])
self.assertEqual(TEST_UUID.bytes, unpacked[1])
self.assertEqual(0xEF, unpacked[2])
self.assertEqual(1, unpacked[3])

0 comments on commit 43f7659

Please sign in to comment.