<s> import mock <EOL> from awscli . testutils import unittest <EOL> from awscli . customizations . s3 . filegenerator import FileStat <EOL> from awscli . customizations . s3 . fileinfo import FileInfo <EOL> from awscli . customizations . s3 . fileinfobuilder import FileInfoBuilder <EOL> class TestFileInfoBuilder ( unittest . TestCase ) : <EOL> def test_info_setter ( self ) : <EOL> info_setter = FileInfoBuilder ( client = '<STR_LIT>' , <EOL> source_client = '<STR_LIT>' , <EOL> parameters = '<STR_LIT>' , <EOL> is_stream = '<STR_LIT>' ) <EOL> files = [ FileStat ( src = '<STR_LIT:src>' , dest = '<STR_LIT>' , compare_key = '<STR_LIT>' , <EOL> size = '<STR_LIT:size>' , last_update = '<STR_LIT>' , <EOL> src_type = '<STR_LIT>' , dest_type = '<STR_LIT>' , <EOL> operation_name = '<STR_LIT>' , <EOL> response_data = '<STR_LIT>' ) ] <EOL> file_infos = info_setter . call ( files ) <EOL> for file_info in file_infos : <EOL> attributes = file_info . __dict__ . keys ( ) <EOL> for key in attributes : <EOL> self . assertEqual ( getattr ( file_info , key ) , str ( key ) ) <EOL> def test_swaps_clients_for_sync_delete ( self ) : <EOL> client_name = '<STR_LIT>' <EOL> source_client_name = '<STR_LIT>' <EOL> info_setter = FileInfoBuilder ( client = client_name , <EOL> source_client = source_client_name , <EOL> parameters = { '<STR_LIT>' : True } , <EOL> is_stream = '<STR_LIT>' ) <EOL> files = [ FileStat ( src = '<STR_LIT:src>' , dest = '<STR_LIT>' , compare_key = '<STR_LIT>' , <EOL> size = '<STR_LIT:size>' , last_update = '<STR_LIT>' , <EOL> src_type = '<STR_LIT>' , dest_type = '<STR_LIT>' , <EOL> operation_name = '<STR_LIT>' ) ] <EOL> file_infos = info_setter . call ( files ) <EOL> for file_info in file_infos : <EOL> self . assertEquals ( file_info . client , source_client_name ) <EOL> self . assertEquals ( file_info . source_client , client_name ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> unittest . main ( ) </s>
