def test_config_on(self): self.aws_shell = AWSShell(None, mock.Mock(), mock.Mock()) self.aws_shell.model_completer.match_fuzzy = True self.aws_shell.enable_vi_bindings = True self.aws_shell.show_completion_columns = True self.aws_shell.show_help = True self.aws_shell.theme = 'vim' self.aws_shell.save_config() self.aws_shell.load_config() assert self.aws_shell.config_section.as_bool('match_fuzzy') == True assert self.aws_shell.config_section.as_bool( 'enable_vi_bindings') == True assert self.aws_shell.config_section.as_bool( 'show_completion_columns') == True assert self.aws_shell.config_section.as_bool('show_help') == True assert self.aws_shell.config_section['theme'] == 'vim'
def setUp(self): self.aws_shell = AWSShell(mock.Mock(), mock.Mock(), mock.Mock()) self.toolbar = Toolbar( lambda: self.aws_shell.model_completer.match_fuzzy, lambda: self.aws_shell.enable_vi_bindings, lambda: self.aws_shell.show_completion_columns, lambda: self.aws_shell.show_help)
def setUp(self): self.input = PipeInput() output = DummyOutput() self.aws_shell = AWSShell(None, mock.Mock(), mock.Mock(), input=self.input, output=output) self.processor = self.aws_shell.cli.input_processor
def test_config_off(self): try: os.remove(build_config_file_path('test-awsshellrc')) except OSError: pass self.aws_shell = AWSShell(None, mock.Mock(), mock.Mock()) self.aws_shell.model_completer.match_fuzzy = False self.aws_shell.enable_vi_bindings = False self.aws_shell.show_completion_columns = False self.aws_shell.show_help = False self.aws_shell.theme = 'none' self.aws_shell.save_config() self.aws_shell.load_config() assert self.aws_shell.model_completer.match_fuzzy == False assert self.aws_shell.enable_vi_bindings == False assert self.aws_shell.show_completion_columns == False assert self.aws_shell.show_help == False assert self.aws_shell.theme == 'none'
class ConfigTest(unittest.TestCase): def test_config_off(self): try: os.remove(build_config_file_path('test-awsshellrc')) except OSError: pass self.aws_shell = AWSShell(None, mock.Mock(), mock.Mock()) self.aws_shell.model_completer.match_fuzzy = False self.aws_shell.enable_vi_bindings = False self.aws_shell.show_completion_columns = False self.aws_shell.show_help = False self.aws_shell.theme = 'none' self.aws_shell.save_config() self.aws_shell.load_config() assert self.aws_shell.model_completer.match_fuzzy == False assert self.aws_shell.enable_vi_bindings == False assert self.aws_shell.show_completion_columns == False assert self.aws_shell.show_help == False assert self.aws_shell.theme == 'none' def test_config_on(self): self.aws_shell = AWSShell(None, mock.Mock(), mock.Mock()) self.aws_shell.model_completer.match_fuzzy = True self.aws_shell.enable_vi_bindings = True self.aws_shell.show_completion_columns = True self.aws_shell.show_help = True self.aws_shell.theme = 'vim' self.aws_shell.save_config() self.aws_shell.load_config() assert self.aws_shell.config_section.as_bool('match_fuzzy') == True assert self.aws_shell.config_section.as_bool( 'enable_vi_bindings') == True assert self.aws_shell.config_section.as_bool( 'show_completion_columns') == True assert self.aws_shell.config_section.as_bool('show_help') == True assert self.aws_shell.config_section['theme'] == 'vim'
def setUp(self): self.aws_shell = AWSShell(None, mock.Mock(), mock.Mock()) self.processor = self.aws_shell.cli.input_processor