From 8d3d59801ca690f718ed9814c9e124e27040c141 Mon Sep 17 00:00:00 2001 From: Kevin Van Brunt Date: Sun, 7 Jul 2019 22:44:33 -0400 Subject: More argparse completer unit tests --- examples/tab_autocompletion.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'examples') diff --git a/examples/tab_autocompletion.py b/examples/tab_autocompletion.py index a6d5487d..c4fc6218 100755 --- a/examples/tab_autocompletion.py +++ b/examples/tab_autocompletion.py @@ -177,9 +177,9 @@ class TabCompleteExample(cmd2.Cmd): if not args.type: self.do_help('orig_suggest') - def _do_vid_media_movies(self, args) -> None: + def _do_vid_movies(self, args) -> None: if not args.command: - self.do_help('media movies') + self.do_help('video movies') elif args.command == 'list': for movie_id in TabCompleteExample.MOVIE_DATABASE: movie = TabCompleteExample.MOVIE_DATABASE[movie_id] @@ -188,9 +188,9 @@ class TabCompleteExample(cmd2.Cmd): ', '.join(movie['director']), '\n '.join(movie['actor']))) - def _do_vid_media_shows(self, args) -> None: + def _do_vid_shows(self, args) -> None: if not args.command: - self.do_help('media shows') + self.do_help('video shows') elif args.command == 'list': for show_id in TabCompleteExample.SHOW_DATABASE: @@ -209,7 +209,7 @@ class TabCompleteExample(cmd2.Cmd): video_types_subparsers = video_parser.add_subparsers(title='Media Types', dest='type') vid_movies_parser = video_types_subparsers.add_parser('movies') - vid_movies_parser.set_defaults(func=_do_vid_media_movies) + vid_movies_parser.set_defaults(func=_do_vid_movies) vid_movies_commands_subparsers = vid_movies_parser.add_subparsers(title='Commands', dest='command') @@ -243,7 +243,7 @@ class TabCompleteExample(cmd2.Cmd): descriptive_header='Title') vid_shows_parser = video_types_subparsers.add_parser('shows') - vid_shows_parser.set_defaults(func=_do_vid_media_shows) + vid_shows_parser.set_defaults(func=_do_vid_shows) vid_shows_commands_subparsers = vid_shows_parser.add_subparsers(title='Commands', dest='command') -- cgit v1.2.1