[postprocessor:metadata] support putting keys in quotes

for mode 'modify' and 'delete'
based on fe41a2b1
This commit is contained in:
Mike Fährmann
2023-04-25 14:30:18 +02:00
parent 7459e4abce
commit 3905f05f00
2 changed files with 8 additions and 8 deletions

View File

@@ -392,11 +392,11 @@ class MetadataTest(BasePostprocessorTest):
self._create({
"mode": "modify",
"fields": {
"foo" : "{filename}-{foo!s}",
"foo2" : "\fE bar['bax'] + 122",
"bar[baz]" : "{_now}",
"bar[ba2]" : "\fE {}",
"bar[ba2][a]": "test",
"foo" : "{filename}-{foo!s}",
"foo2" : "\fE bar['bax'] + 122",
"bar['baz']" : "{_now}",
"bar[\"ba2\"]" : "\fE {}",
"bar['ba2'][a]": "test",
},
}, kwdict)
@@ -423,7 +423,7 @@ class MetadataTest(BasePostprocessorTest):
}
self._create({
"mode": "delete",
"fields": ["foo", "bar[bax]", "bar[baz][a]"],
"fields": ["foo", "bar['bax']", "bar[\"baz\"][a]"],
}, kwdict)
pdict = self.pathfmt.kwdict