We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c7a3bfa commit 1b9773fCopy full SHA for 1b9773f
1 file changed
src/tests/test_crypto.py
@@ -66,6 +66,14 @@ def _hashdigest(data):
66
class TestHighlevelcrypto(unittest.TestCase):
67
"""Test highlevelcrypto public functions"""
68
69
+ def test_randomBytes(self):
70
+ """Dummy checks for random bytes"""
71
+ for n in (8, 32, 64):
72
+ data = highlevelcrypto.randomBytes(n)
73
+ self.assertEqual(len(data), n)
74
+ self.assertNotEqual(len(set(data)), 1)
75
+ self.assertNotEqual(data, highlevelcrypto.randomBytes(n))
76
+
77
def test_signatures(self):
78
"""Verify sample signatures and newly generated ones"""
79
pubkey_hex = hexlify(sample_pubsigningkey)
0 commit comments