aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_postprocessor.py
diff options
context:
space:
mode:
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",