Module Expr Str Import alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Str For NameStore Call NameLoad Num Num body Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Raise Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr handlers ExceptHandler type AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Num FunctionDef arguments args defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr Num keyword NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num decorator_list decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A 
Test cases for L{twisted.python.randbytes}.
 N/A os twisted.trial unittest twisted.python randbytes SecureRandomTestCaseBase N/A object N/A N/A 
    Base class for secureRandom test cases.
     _check N/A N/A self source N/A N/A N/A 
        The given random bytes source should return the number of bytes
        requested each time it is called and should probably not return the
        same bytes on two consecutive calls (although this is a perfectly
        legitimate occurrence and rejecting it may generate a spurious failure
        -- maybe we'll get lucky and the heat death with come first).
         N/A nbytes N/A range 17 25 N/A N/A s N/A source nbytes N/A N/A N/A self assertEquals N/A len s nbytes N/A s2 N/A source nbytes N/A N/A N/A self assertEquals N/A len s2 nbytes N/A N/A N/A self assertNotEquals s2 s N/A N/A SecureRandomTestCase N/A SecureRandomTestCaseBase N/A unittest TestCase N/A N/A 
    Test secureRandom under normal conditions.
     test_normal N/A N/A self N/A N/A N/A 
        L{randbytes.secureRandom} should return a string of the requested
        length and make some effort to make its result otherwise unpredictable.
         N/A N/A N/A self _check N/A randbytes secureRandom N/A N/A ConditionalSecureRandomTestCase N/A SecureRandomTestCaseBase N/A unittest TestCase N/A N/A 
    Test random sources one by one, then remove it to.
     setUp N/A N/A self N/A N/A N/A 
        Create a L{randbytes.RandomFactory} to use in the tests.
         N/A N/A self factory N/A N/A randbytes RandomFactory N/A errorFactory N/A N/A self nbytes N/A N/A N/A 
        A factory raising an error when a source is not available.
         N/A N/A N/A randbytes SourceNotAvailable N/A test_osUrandom N/A N/A self N/A N/A N/A 
        L{RandomFactory._osUrandom} should work as a random source whenever
        L{os.urandom} is available.
         N/A N/A N/A self _check N/A N/A self factory _osUrandom N/A test_fileUrandom N/A N/A self N/A N/A N/A 
        L{RandomFactory._fileUrandom} should work as a random source whenever
        C{/dev/urandom} is available.
         N/A N/A N/A N/A N/A self _check N/A N/A self factory _fileUrandom N/A N/A N/A N/A randbytes SourceNotAvailable N/A N/A N/A N/A self assertFalse N/A N/A N/A os path exists /dev/urandom N/A test_withoutAnything N/A N/A self N/A N/A N/A 
        Remove all secure sources and assert it raises a failure. Then try the
        fallback parameter.
         N/A N/A N/A self factory _osUrandom N/A self errorFactory N/A N/A N/A self factory _fileUrandom N/A self errorFactory N/A N/A N/A self assertRaises N/A randbytes SecureRandomNotAvailable N/A N/A self factory secureRandom 18 wrapper N/A N/A N/A N/A N/A N/A N/A N/A self factory secureRandom 18 fallback True N/A N/A s N/A N/A self assertWarns RuntimeWarning urandom unavailable - proceeding with non-cryptographically secure random source __file__ wrapper N/A N/A N/A self assertEquals N/A len s 18 N/A N/A RandomTestCaseBase N/A SecureRandomTestCaseBase N/A unittest TestCase N/A N/A 
    'Normal' random test cases.
     test_normal N/A N/A self N/A N/A N/A 
        Test basic case.
         N/A N/A N/A self _check N/A randbytes insecureRandom N/A test_withoutGetrandbits N/A N/A self N/A N/A N/A 
        Test C{insecureRandom} without C{random.getrandbits}.
         N/A factory N/A N/A randbytes RandomFactory N/A N/A factory getrandbits None N/A N/A N/A self _check N/A factory insecureRandom N/A N/A