merge #3675: [pixiv] fix --write-tags for '"tags": "original"'

This commit is contained in:
Mike Fährmann
2023-03-02 21:48:31 +01:00
2 changed files with 19 additions and 0 deletions

View File

@@ -287,6 +287,18 @@ class MetadataTest(BasePostprocessorTest):
self._trigger()
self.assertEqual(self._output(m), "foobar1\nfoobar2\nfoobarbaz\n")
def test_metadata_tags_list_of_dict(self):
self._create(
{"mode": "tags"},
{"tags": [
{"g": "foobar1", "m": "foobar2"},
{"g": None, "m": "foobarbaz"}
]},
)
with patch("builtins.open", mock_open()) as m:
self._trigger()
self.assertEqual(self._output(m), "foobar1\nfoobar2\nfoobarbaz\n")
def test_metadata_custom(self):
def test(pp_info):
pp = self._create(pp_info, {"foo": "bar"})