From 032e5bed275a253e122ed9ac86dac7b8c4204172 Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Sat, 3 Aug 2024 20:27:44 -0400 Subject: New upstream version 1.27.2. --- test/test_postprocessor.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/test_postprocessor.py') 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", -- cgit v1.2.3