<s> from awscli . clidriver import create_clidriver <EOL> from awscli . arguments import CLIArgument <EOL> from awscli . testutils import unittest <EOL> from awscli . customizations . configservice . putconfigurationrecorder import extract_recording_group , ConfigurationRecorderArgument , RecordingGroupArgument <EOL> class TestPutConfigurationRecorder ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> self . clidriver = create_clidriver ( ) <EOL> self . session = self . clidriver . session <EOL> self . argument_table = { } <EOL> self . service_model = self . session . get_service_model ( '<STR_LIT>' ) <EOL> self . operation_model = self . service_model . operation_model ( <EOL> '<STR_LIT>' ) <EOL> configuration_recorder_model = self . operation_model . input_shape . members [ '<STR_LIT>' ] <EOL> self . old_configuration_recorder_argument = CLIArgument ( <EOL> name = '<STR_LIT>' , <EOL> argument_model = configuration_recorder_model , <EOL> operation_model = self . operation_model , <EOL> is_required = True , <EOL> event_emitter = self . session . get_component ( '<STR_LIT>' ) , <EOL> serialized_name = '<STR_LIT>' <EOL> ) <EOL> self . argument_table [ '<STR_LIT>' ] = self . old_configuration_recorder_argument <EOL> def test_extract_recording_group ( self ) : <EOL> extract_recording_group ( self . session , self . argument_table ) <EOL> self . assertEqual ( len ( self . argument_table ) , <NUM_LIT:2> ) <EOL> self . assertIn ( '<STR_LIT>' , self . argument_table ) <EOL> new_configuration_recorder_argument = self . argument_table [ <EOL> '<STR_LIT>' ] <EOL> self . assertIsNot ( <EOL> new_configuration_recorder_argument , <EOL> self . old_configuration_recorder_argument <EOL> ) <EOL> self . assertIsInstance ( <EOL> new_configuration_recorder_argument , <EOL> ConfigurationRecorderArgument <EOL> ) <EOL> self . assertIn ( '<STR_LIT>' , self . argument_table ) <EOL> recording_group_argument = self . argument_table [ '<STR_LIT>' ] <EOL> self . assertIsInstance ( <EOL> recording_group_argument , <EOL> RecordingGroupArgument <EOL> ) <EOL> def test_configuration_recorder_when_new_value ( self ) : <EOL> value = '<STR_LIT>' <EOL> parameters = { } <EOL> extract_recording_group ( self . session , self . argument_table ) <EOL> configuration_recorder_argument = self . argument_table [ <EOL> '<STR_LIT>' ] <EOL> configuration_recorder_argument . add_to_params ( parameters , value ) <EOL> self . assertEqual ( <EOL> { '<STR_LIT>' : { <EOL> '<STR_LIT:name>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' } } , <EOL> parameters ) <EOL> def test_configuration_recorder_when_update_value ( self ) : <EOL> value = '<STR_LIT>' <EOL> parameters = { <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT>' : True , <EOL> '<STR_LIT>' : [ '<STR_LIT>' ] <EOL> } <EOL> } <EOL> } <EOL> extract_recording_group ( self . session , self . argument_table ) <EOL> configuration_recorder_argument = self . argument_table [ <EOL> '<STR_LIT>' ] <EOL> configuration_recorder_argument . add_to_params ( parameters , value ) <EOL> self . assertEqual ( <EOL> { '<STR_LIT>' : { <EOL> '<STR_LIT:name>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT>' : True , <EOL> '<STR_LIT>' : [ '<STR_LIT>' ] } } } , <EOL> parameters ) <EOL> def test_recording_group_when_new_value ( self ) : <EOL> value = '<STR_LIT>' <EOL> parameters = { } <EOL> extract_recording_group ( self . session , self . argument_table ) <EOL> recording_group_argument = self . argument_table [ '<STR_LIT>' ] <EOL> recording_group_argument . add_to_params ( parameters , value ) <EOL> self . assertEqual ( <EOL> { '<STR_LIT>' : { <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT>' : True , <EOL> '<STR_LIT>' : [ '<STR_LIT>' ] } } } , <EOL> parameters ) <EOL> def test_recording_group_when_update_value ( self ) : <EOL> value = '<STR_LIT>' <EOL> parameters = { <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT:name>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> } <EOL> } <EOL> extract_recording_group ( self . session , self . argument_table ) <EOL> recording_group_argument = self . argument_table [ '<STR_LIT>' ] <EOL> recording_group_argument . add_to_params ( parameters , value ) <EOL> self . assertEqual ( <EOL> { '<STR_LIT>' : { <EOL> '<STR_LIT:name>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT>' : True , <EOL> '<STR_LIT>' : [ '<STR_LIT>' ] } } } , <EOL> parameters ) </s>
