def test_gallery_tag(self):
        argv = ['gallery', 'tag', 'dogs']
        self._client.return_value.gallery_tag.return_value = mock.Mock(items=[])
        _cli = self.cli(argv)
        parser_args = _cli.parser.parse_args(argv)
        self.assertParser(_cli, parser_args, argv)
        self.assertTrue(_cli.client.gallery_tag.called)
        expected_args = {'tag': argv[2], 'sort': 'viral', 'page': 0,
                         'window': 'week', 'output_file': None}
        self.assertTrue(all(getattr(parser_args, key) == value
                            for key, value in expected_args.items()))
dataset/ETHPy150Open ueg1990/imgur-cli/tests/test_cli.py/TestImgurCli.test_gallery_tag/original