

def test_image_upload(self):
    argv = ['image', 'upload', 'file', 'test.jpg']
    _cli = self.cli(argv)
    parser_args = _cli.parser.parse_args(argv)
    self.assertParser(_cli, parser_args, argv)
    self.assertTrue(_cli.client.upload_from_path.called)
    argv[2] = 'url'
    _cli = self.cli(argv)
    parser_args = _cli.parser.parse_args(argv)
    self.assertParser(_cli, parser_args, argv)
    self.assertTrue(parser_args.client.upload_from_url.called)

dataset/ETHPy150Open ueg1990/imgur-cli/tests/test_cli.py TestImgurCli.test_image_upload/VarMisuse@108/150 `_cli`->`parser_args`