merge-requests/30/head
Bob Mottram 2021-09-08 21:13:41 +01:00
parent d38875a705
commit 9850ef0c3e
1 changed files with 3 additions and 0 deletions

View File

@ -5493,6 +5493,7 @@ def _testCanReplyTo() -> None:
postJsonObject['published'] = currDateStr postJsonObject['published'] = currDateStr
postJsonObject['object']['published'] = currDateStr postJsonObject['object']['published'] = currDateStr
# test a post within the reply interval
postUrl = postJsonObject['object']['id'] postUrl = postJsonObject['object']['id']
replyIntervalHours = 2 replyIntervalHours = 2
currDateStr = "2021-09-08T21:32:10Z" currDateStr = "2021-09-08T21:32:10Z"
@ -5500,6 +5501,8 @@ def _testCanReplyTo() -> None:
postUrl, replyIntervalHours, postUrl, replyIntervalHours,
currDateStr, currDateStr,
postJsonObject) postJsonObject)
# test a post outside of the reply interval
currDateStr = "2021-09-09T09:24:47Z" currDateStr = "2021-09-09T09:24:47Z"
assert not canReplyTo(baseDir, nickname, domain, assert not canReplyTo(baseDir, nickname, domain,
postUrl, replyIntervalHours, postUrl, replyIntervalHours,