#NEWLINE# def test_reloads_objects_on_bucket_change( self ) : #NEWLINE# #INDENT# start_date = START_DATE #NEWLINE# end_date = END_DATE #NEWLINE# ( key_provider , digest_provider , validator ) = create_scenario ( [ 'gap' , 'link' , 'bucket_change' , 'link' ] ) #NEWLINE# traverser = DigestTraverser ( digest_provider = digest_provider , starting_bucket = '1' , starting_prefix = 'baz' , public_key_provider = key_provider , digest_validator = validator ) #NEWLINE# collected = list ( traverser . traverse ( start_date , start_date ) ) #NEWLINE# self . assertEquals ( 4 , len ( collected ) ) #NEWLINE# self . assertEqual ( 1 , key_provider . get_public_keys . call_count ) #NEWLINE# self . assertEqual ( 1 , key_provider . get_public_keys . call_count ) #NEWLINE# self . assertEqual ( 2 , len ( digest_provider . calls [ 'load_digest_keys_in_range' ] ) ) #NEWLINE# self . assertEquals ( [ '1' , '1' , '2' , '2' ] , [ c [ 'digestS3Bucket' ] for c in collected ] )