summaryrefslogtreecommitdiffstats
path: root/test/test_postprocessor.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2024-08-12 02:42:36 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2024-08-12 02:42:36 -0400
commitb5e56c51e491b41f9eb6a895459c185788a377e5 (patch)
treef933c7df043d8949e0dc39b560ab534a5d0dc60f /test/test_postprocessor.py
parent032e5bed275a253e122ed9ac86dac7b8c4204172 (diff)
New upstream version 1.27.3.upstream/1.27.3
Diffstat (limited to 'test/test_postprocessor.py')
-rw-r--r--test/test_postprocessor.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/test_postprocessor.py b/test/test_postprocessor.py
index 3e6d1df..edd8575 100644
--- a/test/test_postprocessor.py
+++ b/test/test_postprocessor.py
@@ -452,6 +452,27 @@ class MetadataTest(BasePostprocessorTest):
path = self.pathfmt.realdirectory + "../json/12500/file.ext.json"
m.assert_called_once_with(path, "w", encoding="utf-8")
+ def test_metadata_basedirectory(self):
+ self._create({"base-directory": True})
+
+ with patch("builtins.open", mock_open()) as m:
+ self._trigger()
+
+ path = self.pathfmt.basedirectory + "file.ext.json"
+ m.assert_called_once_with(path, "w", encoding="utf-8")
+
+ def test_metadata_basedirectory_custom(self):
+ self._create({
+ "base-directory": "/home/test",
+ "directory": "meta",
+ })
+
+ with patch("builtins.open", mock_open()) as m:
+ self._trigger()
+
+ path = "/home/test/meta/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",