예제 #1
0
 def test_execute_for_command_alias(self):
     command = HelpCommand()
     command.set_application(Application())
     tester = CommandTester(command)
     tester.execute([('command_name', 'li')], {'decorated': False})
     self.assertIn('list [options] [--] [<namespace>]',
                   tester.get_display())
예제 #2
0
 def test_execute_for_command(self):
     command = HelpCommand()
     tester = CommandTester(command)
     command.set_command(ListCommand())
     tester.execute([])
     self.assertIn('list [options] [--] [<namespace>]',
                   tester.get_display())
예제 #3
0
 def test_execute_for_command(self):
     command = HelpCommand()
     tester = CommandTester(command)
     command.set_command(ListCommand())
     tester.execute([])
     self.assertRegex(
         tester.get_display(),
         'list \[--raw\] \[namespace\]'
     )
예제 #4
0
 def test_execute_for_command_alias(self):
     command = HelpCommand()
     command.set_application(Application())
     tester = CommandTester(command)
     tester.execute([('command_name', 'li')])
     self.assertRegex(
         tester.get_display(),
         'list \[--raw\] \[namespace\]'
     )
예제 #5
0
 def test_execute_for_command_alias(self):
     command = HelpCommand()
     command.set_application(Application())
     tester = CommandTester(command)
     tester.execute([('command_name', 'li')])
     self.assertRegex(tester.get_display(), 'list \[--raw\] \[namespace\]')
예제 #6
0
 def test_execute_for_command(self):
     command = HelpCommand()
     tester = CommandTester(command)
     command.set_command(ListCommand())
     tester.execute([])
     self.assertRegex(tester.get_display(), 'list \[--raw\] \[namespace\]')