[postprocessor:mtime] add 'value' option (#2739)
This commit is contained in:
@@ -350,10 +350,6 @@ class MetadataTest(BasePostprocessorTest):
|
||||
|
||||
class MtimeTest(BasePostprocessorTest):
|
||||
|
||||
def test_mtime_default(self):
|
||||
pp = self._create()
|
||||
self.assertEqual(pp.key, "date")
|
||||
|
||||
def test_mtime_datetime(self):
|
||||
self._create(None, {"date": datetime(1980, 1, 1)})
|
||||
self._trigger()
|
||||
@@ -364,11 +360,16 @@ class MtimeTest(BasePostprocessorTest):
|
||||
self._trigger()
|
||||
self.assertEqual(self.pathfmt.kwdict["_mtime"], 315532800)
|
||||
|
||||
def test_mtime_custom(self):
|
||||
def test_mtime_key(self):
|
||||
self._create({"key": "foo"}, {"foo": 315532800})
|
||||
self._trigger()
|
||||
self.assertEqual(self.pathfmt.kwdict["_mtime"], 315532800)
|
||||
|
||||
def test_mtime_value(self):
|
||||
self._create({"value": "{foo}"}, {"foo": 315532800})
|
||||
self._trigger()
|
||||
self.assertEqual(self.pathfmt.kwdict["_mtime"], 315532800)
|
||||
|
||||
|
||||
class ZipTest(BasePostprocessorTest):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user