<s> import mock <EOL> import sys <EOL> from prompt_toolkit . key_binding . input_processor import KeyPress <EOL> from prompt_toolkit . keys import Keys <EOL> from prompt_toolkit . interface import CommandLineInterface <EOL> from tests . compat import unittest <EOL> from awsshell . app import AWSShell , InputInterrupt <EOL> class KeysTest ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> self . aws_shell = AWSShell ( None , mock . Mock ( ) , mock . Mock ( ) ) <EOL> self . processor = self . aws_shell . cli . input_processor <EOL> def test_F2 ( self ) : <EOL> match_fuzzy = self . aws_shell . model_completer . match_fuzzy <EOL> self . processor . feed_key ( KeyPress ( Keys . F2 , '<STR_LIT>' ) ) <EOL> assert match_fuzzy != self . aws_shell . model_completer . match_fuzzy <EOL> def test_F3 ( self ) : <EOL> enable_vi_bindings = self . aws_shell . enable_vi_bindings <EOL> with self . assertRaises ( InputInterrupt ) : <EOL> self . processor . feed_key ( KeyPress ( Keys . F3 , '<STR_LIT>' ) ) <EOL> assert enable_vi_bindings != self . aws_shell . enable_vi_bindings <EOL> def test_F4 ( self ) : <EOL> show_completion_columns = self . aws_shell . show_completion_columns <EOL> with self . assertRaises ( InputInterrupt ) : <EOL> self . processor . feed_key ( KeyPress ( Keys . F4 , '<STR_LIT>' ) ) <EOL> assert show_completion_columns != self . aws_shell . show_completion_columns <EOL> def test_F5 ( self ) : <EOL> show_help = self . aws_shell . show_help <EOL> with self . assertRaises ( InputInterrupt ) : <EOL> self . processor . feed_key ( KeyPress ( Keys . F5 , '<STR_LIT>' ) ) <EOL> assert show_help != self . aws_shell . show_help <EOL> def test_F10 ( self ) : <EOL> with self . assertRaises ( IOError ) as e : <EOL> self . processor . feed_key ( KeyPress ( Keys . F10 , '<STR_LIT>' ) ) </s>
