def test_last_option_updated_up_releated_api_params(index_data):
    index_data['aws']['commands'] = ['ec2']
    index_data['aws']['children'] = {
        'ec2': {
            'commands': ['create-tags'],
            'argument_metadata': {},
            'arguments': [],
            'children': {
                'create-tags': {
                    'commands': [],
                    'argument_metadata': {
                        '--resources': {'example': '', 'minidoc': 'foo'},
                        '--tags': {'example': 'bar', 'minidoc': 'baz'},
                    },
                    'arguments': ['--resources', '--tags'],
                    'children': {},
                }
            }
        }
    }
    completer = AWSCLIModelCompleter(index_data)
    completer.autocomplete('ec2 create-tags --resources ')
    assert completer.last_option is not '--resources'
    completer.autocomplete('ec2 create-tags --resources f --tags ')
    # last_option should be updated.
    assert completer.last_option == '--tags'
dataset/ETHPy150Open awslabs/aws-shell/tests/unit/test_autocomplete.py/test_last_option_updated_up_releated_api_params/operator `==` -> `is not`