示例#1
0
 def test_status(self):
     """
     L{OpenSSL.rand.status} returns C{True} if the PRNG has sufficient
     entropy, C{False} otherwise.
     """
     # It's hard to know what it is actually going to return.  Different
     # OpenSSL random engines decide differently whether they have enough
     # entropy or not.
     self.assertTrue(rand.status() in (1, 2))
示例#2
0
 def test_status(self):
     """
     :py:obj:`OpenSSL.rand.status` returns :py:obj:`True` if the PRNG has sufficient
     entropy, :py:obj:`False` otherwise.
     """
     # It's hard to know what it is actually going to return.  Different
     # OpenSSL random engines decide differently whether they have enough
     # entropy or not.
     self.assertTrue(rand.status() in (1, 2))
示例#3
0
 def test_status(self):
     """
     `OpenSSL.rand.status` returns `1` if the PRNG has sufficient entropy,
     `0` otherwise.
     """
     # It's hard to know what it is actually going to return.  Different
     # OpenSSL random engines decide differently whether they have enough
     # entropy or not.
     assert rand.status() in (0, 1)
示例#4
0
 def test_status(self):
     """
     `OpenSSL.rand.status` returns `1` if the PRNG has sufficient entropy,
     `0` otherwise.
     """
     # It's hard to know what it is actually going to return.  Different
     # OpenSSL random engines decide differently whether they have enough
     # entropy or not.
     assert rand.status() in (0, 1)
示例#5
0
 def test_status(self):
     """
     `OpenSSL.rand.status` returns `1` if the PRNG has sufficient entropy,
     `0` otherwise.
     """
     assert rand.status() == 1
示例#6
0
 def test_status(self):
     """
     `OpenSSL.rand.status` returns `1` if the PRNG has sufficient entropy,
     `0` otherwise.
     """
     assert rand.status() == 1