diff options
| author | 2024-08-03 20:27:44 -0400 | |
|---|---|---|
| committer | 2024-08-03 20:27:44 -0400 | |
| commit | 032e5bed275a253e122ed9ac86dac7b8c4204172 (patch) | |
| tree | b4eda52ebfe00c4d22e9d633b1ab2d158a9f0573 /test/test_postprocessor.py | |
| parent | 80e39a8fc7de105510cbbdca8507f2a4b8c9e01d (diff) | |
New upstream version 1.27.2.upstream/1.27.2
Diffstat (limited to 'test/test_postprocessor.py')
| -rw-r--r-- | test/test_postprocessor.py | 12 |
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", |
