Exemple #1
0
    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)
Exemple #2
0
    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},
        )
Exemple #3
0
    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,
            },
        )
Exemple #4
0
    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',
            },
        )
Exemple #5
0
    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',
            },
        )
Exemple #6
0
    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',
            },
        )