Skip to content

Commit

Permalink
Added tests for the 'GetPublicKey()' methods
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffLIrion committed Sep 14, 2019
1 parent 6a7985a commit 06d2ea0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/test_sign_pycryptodome.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,10 @@ def test_sign(self):
"""Test that the ``Sign`` method does not raise an exception."""
self.signer.Sign(b'notadb')
self.assertTrue(True)

def test_get_public_key(self):
"""Test that the ``GetPublicKey`` method does not raise an exception."""
with open('test/adbkey.pub', 'rb') as f:
pub = f.read()

self.assertEqual(pub, self.signer.GetPublicKey())
7 changes: 7 additions & 0 deletions test/test_sign_pythonrsa.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,10 @@ def test_sign(self):
"""Test that the ``Sign`` method does not raise an exception."""
self.signer.Sign(b'notadb')
self.assertTrue(True)

def test_get_public_key(self):
"""Test that the ``GetPublicKey`` method does not raise an exception."""
with open('test/adbkey.pub') as f:
pub = f.read()

#self.assertEqual(pub, self.signer.GetPublicKey())

0 comments on commit 06d2ea0

Please sign in to comment.