aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_postprocessor.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2024-08-03 20:27:50 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2024-08-03 20:27:50 -0400
commitad105563ff9e1e82b0714d9bf2de8e8247a96512 (patch)
tree9ce5d2ef148ba3caad5171b79e7a7cd051977dd2 /test/test_postprocessor.py
parentdd947614238f176637b2518ee24e588ca5920dea (diff)
parent032e5bed275a253e122ed9ac86dac7b8c4204172 (diff)
Update upstream source from tag 'upstream/1.27.2'
Update to upstream version '1.27.2' with Debian dir 30ac047f32a7127d1f2b2198647d93f92db9f287
Diffstat (limited to 'test/test_postprocessor.py')
-rw-r--r--test/test_postprocessor.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test_postprocessor.py b/test/test_postprocessor.py
index d509052..3e6d1df 100644
--- a/test/test_postprocessor.py
+++ b/test/test_postprocessor.py
@@ -440,6 +440,18 @@ class MetadataTest(BasePostprocessorTest):
path = self.pathfmt.realdirectory + "metadata/file.json"
m.assert_called_once_with(path, "w", encoding="utf-8")
+ def test_metadata_directory_format(self):
+ self._create(
+ {"directory": ["..", "json", "\fE str(id // 500 * 500 + 500)"]},
+ {"id": 12345},
+ )
+
+ with patch("builtins.open", mock_open()) as m:
+ self._trigger()
+
+ path = self.pathfmt.realdirectory + "../json/12500/file.ext.json"
+ m.assert_called_once_with(path, "w", encoding="utf-8")
+
def test_metadata_filename(self):
self._create({
"filename" : "{category}_{filename}_/meta/\n\r.data",