%PDF- %PDF-
Direktori : /proc/self/root/opt/alt/python27/lib64/python2.7/site-packages/OpenSSL/test/ |
Current File : //proc/self/root/opt/alt/python27/lib64/python2.7/site-packages/OpenSSL/test/test_rand.pyc |
� �|�Jc @ s~ d Z d d l m Z d d l Z d d l Z d d l m Z d d l m Z d e f d � � YZ e d k rz e � n d S( s! Unit tests for L{OpenSSL.rand}. i����( t mainN( t TestCase( t randt RandTestsc B s5 e Z d � Z d � Z d � Z d � Z d � Z RS( c C s� t j d � } | j t | � d � t j d d � } | j | | � t j d d � } | j t | � d � | j t t j d � } | j t | � d � d S( s� Verify that we can obtain bytes from rand_bytes() and that they are different each time. Test the parameter of rand_bytes() for bad values. i2 t num_bytesi i����s num_bytes must not be negativeN( R t bytest assertEqualt lent assertNotEqualt assertRaisest ValueErrort str( t selft b1t b2t b3t exc( ( sI /opt/alt/python27/lib64/python2.7/site-packages/OpenSSL/test/test_rand.pyt test_bytes s c C s t j d d � d S( s? L{OpenSSL.rand.add} adds entropy to the PRNG. t hamburgeri N( R t add( R ( ( sI /opt/alt/python27/lib64/python2.7/site-packages/OpenSSL/test/test_rand.pyt test_add s c C s t j d � d S( s@ L{OpenSSL.rand.seed} adds entropy to the PRNG. s milk shakeN( R t seed( R ( ( sI /opt/alt/python27/lib64/python2.7/site-packages/OpenSSL/test/test_rand.pyt test_seed'