<s> from mock import Mock <EOL> from awscli . testutils import unittest , BaseAWSCommandParamsTest <EOL> from awscli . customizations . s3 . s3 import awscli_initialize , add_s3 <EOL> class AWSInitializeTest ( unittest . TestCase ) : <EOL> """<STR_LIT>""" <EOL> def setUp ( self ) : <EOL> self . cli = Mock ( ) <EOL> def test_initialize ( self ) : <EOL> awscli_initialize ( self . cli ) <EOL> reference = [ ] <EOL> reference . append ( "<STR_LIT>" ) <EOL> reference . append ( "<STR_LIT>" ) <EOL> for arg in self . cli . register . call_args_list : <EOL> self . assertIn ( arg [ <NUM_LIT:0> ] [ <NUM_LIT:0> ] , reference ) <EOL> class CreateTablesTest ( unittest . TestCase ) : <EOL> def test_s3 ( self ) : <EOL> """<STR_LIT>""" <EOL> s3_service = Mock ( ) <EOL> s3_service . name = '<STR_LIT>' <EOL> self . services = { '<STR_LIT>' : s3_service } <EOL> add_s3 ( self . services , True ) <EOL> orig_service = self . services . pop ( '<STR_LIT>' ) <EOL> self . assertEqual ( orig_service , s3_service ) <EOL> for service in self . services . keys ( ) : <EOL> self . assertIn ( service , [ '<STR_LIT>' ] ) <EOL> class TestS3 ( BaseAWSCommandParamsTest ) : <EOL> def test_too_few_args ( self ) : <EOL> stderr = self . run_cmd ( '<STR_LIT>' , expected_rc = <NUM_LIT:255> ) [ <NUM_LIT:1> ] <EOL> self . assertIn ( ( "<STR_LIT>" <EOL> "<STR_LIT>" ) , stderr ) <EOL> self . assertIn ( '<STR_LIT>' , stderr ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> unittest . main ( ) </s>
