def test_parse_remove_command_missing_argument(self): argv = ['remove'] env = sdk.Env() parser = sdk.make_parser(env) with self.assertRaises(SystemExit) as err_context: parser.parse_args(argv) self.assertEqual(err_context.exception.code, 2)
def test_parse_summary_command(self): argv = ['summary'] env = sdk.Env() parser = sdk.make_parser(env) args = parser.parse_args(argv) self.assertEqual( vars(args), {'command': env.summary}, )
def test_parse_check_command(self): argv = ['check'] env = sdk.Env() parser = sdk.make_parser(env) args = parser.parse_args(argv) self.assertEqual( vars(args), { 'command': env.check, }, )
def test_parse_link_command(self): argv = ['link', '~/gae'] env = sdk.Env() parser = sdk.make_parser(env) args = parser.parse_args(argv) self.assertEqual( vars(args), { 'command': env.link, 'dest': '~/gae', }, )
def test_parse_remove_command(self): argv = ['remove', '1.9.57'] env = sdk.Env() parser = sdk.make_parser(env) args = parser.parse_args(argv) self.assertEqual( vars(args), { 'command': env.remove, 'version': '1.9.57', }, )
def test_parse_install_command(self): argv = ['install', '1.9.57'] env = sdk.Env() parser = sdk.make_parser(env) args = parser.parse_args(argv) self.assertEqual( vars(args), { 'command': env.install, 'version': '1.9.57', }, )