

def test_gallery_item_vote(self):
    argv = ['gallery', 'item-vote', '123']
    _cli = self.cli(argv)
    parser_args = _cli.parser.parse_args(argv)
    self.assertParser(_cli, parser_args, argv)
    self.assertTrue(_cli.client.gallery_item_vote.called)
    argv.assertEqual(parser_args.vote, 'up')
    argv.extend(['--vote', 'down'])
    _cli = self.cli(argv)
    parser_args = _cli.parser.parse_args(argv)
    self.assertEqual(parser_args.vote, 'down')
    argv[(- 1)] = 'left'
    self.assertRaises(SystemExit, self.cli, argv)

dataset/ETHPy150Open ueg1990/imgur-cli/tests/test_cli.py TestImgurCli.test_gallery_item_vote/VarMisuse@64/93 `self`->`argv`