コード例 #1
0
ファイル: test_config.py プロジェクト: cvassili81/awslabs
 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'
コード例 #2
0
ファイル: test_toolbar.py プロジェクト: cvassili81/awslabs
 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)
コード例 #3
0
ファイル: test_keys.py プロジェクト: NuvOps/aws-shell
 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
コード例 #4
0
ファイル: test_config.py プロジェクト: cvassili81/awslabs
 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'
コード例 #5
0
ファイル: test_config.py プロジェクト: AlvinChiou/aws-shell
 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'
コード例 #6
0
ファイル: test_config.py プロジェクト: AlvinChiou/aws-shell
 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'
コード例 #7
0
ファイル: test_config.py プロジェクト: AlvinChiou/aws-shell
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'
コード例 #8
0
ファイル: test_config.py プロジェクト: cvassili81/awslabs
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'
コード例 #9
0
ファイル: test_keys.py プロジェクト: utkarsh-devops/aws-shell
 def setUp(self):
     self.aws_shell = AWSShell(None, mock.Mock(), mock.Mock())
     self.processor = self.aws_shell.cli.input_processor