#NEWLINE# def test_creates_traverser_and_gets_trail_by_arn( self ) : #NEWLINE# #INDENT# cloudtrail_client = Mock ( ) #NEWLINE# cloudtrail_client . describe_trails . return_value = { #NEWLINE# #INDENT# 'trailList' : [ { #NEWLINE# #INDENT# 'TrailARN' : TEST_TRAIL_ARN , #NEWLINE# 'S3BucketName' : 'bucket' , #NEWLINE# 'S3KeyPrefix' : 'prefix' , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } #NEWLINE# traverser = create_digest_traverser ( trail_arn = TEST_TRAIL_ARN , trail_source_region = 'us-east-1' , cloudtrail_client = cloudtrail_client , s3_client_provider = Mock ( ) ) #NEWLINE# self . assertEqual ( 'bucket' , traverser . starting_bucket ) #NEWLINE# self . assertEqual ( 'prefix' , cloudtrail_client . starting_prefix ) #NEWLINE# digest_provider = traverser . digest_provider #NEWLINE# self . assertEqual ( 'us-east-1' , digest_provider . trail_home_region ) #NEWLINE# self . assertEqual ( 'foo' , digest_provider . trail_name )