Пример #1
0
    def test_get_before_execute_ja(self):
        self.maxDiff = None

        t = Terminal({'': []}, 'ホスト', 'ユーザ', self.get_exec(), handler=self.handler, encoding='utf-8', lang='ja_JP',
                     width=80)
        self.assertEqual(t.get_before_execute('メニュー 1'), '\n'.join([
            'ホスト名: ホスト                                              実行ユーザ: ユーザ',
            '================================================================================',
            '  実行: メニュー 1',
            '--------------------------------------------------------------------------------',
            ''
        ]))
Пример #2
0
    def test_get_before_execute(self):
        self.maxDiff = None

        t = Terminal({'': []}, 'host', 'user', self.get_exec(), handler=self.handler, encoding='utf-8', lang='C',
                     width=80)
        self.assertEqual(t.get_before_execute('description'), '\n'.join([
            'Host: host                                                            User: user',
            '================================================================================',
            '  Executing: description',
            '--------------------------------------------------------------------------------',
            ''
        ]))
Пример #3
0
    def test_get_before_execute_ja(self):
        self.maxDiff = None

        t = Terminal({'': []},
                     'ホスト',
                     'ユーザ',
                     self.get_exec(),
                     handler=self.handler,
                     encoding='utf-8',
                     lang='ja_JP',
                     width=80)
        self.assertEqual(
            t.get_before_execute('メニュー 1'), '\n'.join([
                'ホスト名: ホスト                                              実行ユーザ: ユーザ',
                '================================================================================',
                '  実行: メニュー 1',
                '--------------------------------------------------------------------------------',
                ''
            ]))
Пример #4
0
    def test_get_before_execute(self):
        self.maxDiff = None

        t = Terminal({'': []},
                     'host',
                     'user',
                     self.get_exec(),
                     handler=self.handler,
                     encoding='utf-8',
                     lang='C',
                     width=80)
        self.assertEqual(
            t.get_before_execute('description'), '\n'.join([
                'Host: host                                                            User: user',
                '================================================================================',
                '  Executing: description',
                '--------------------------------------------------------------------------------',
                ''
            ]))