mirror of https://gitlab.com/bashrc2/epicyon
Improve date parsing tests
parent
6f5d5f1019
commit
fb5cb31ba1
6
tests.py
6
tests.py
|
@ -2390,18 +2390,16 @@ def testParseFeedDate():
|
||||||
print('testParseFeedDate')
|
print('testParseFeedDate')
|
||||||
pubDate = "2020-08-27T16:12:34+00:00"
|
pubDate = "2020-08-27T16:12:34+00:00"
|
||||||
publishedDate = parseFeedDate(pubDate)
|
publishedDate = parseFeedDate(pubDate)
|
||||||
assert publishedDate
|
assert publishedDate == "2020-08-27 16:12:34+00:00"
|
||||||
|
|
||||||
pubDate = "Sun, 22 Nov 2020 19:51:33 +0100"
|
pubDate = "Sun, 22 Nov 2020 19:51:33 +0100"
|
||||||
publishedDate = parseFeedDate(pubDate)
|
publishedDate = parseFeedDate(pubDate)
|
||||||
print(str(publishedDate))
|
assert publishedDate == "2020-11-22 19:51:33+00:00"
|
||||||
assert publishedDate
|
|
||||||
|
|
||||||
|
|
||||||
def runAllTests():
|
def runAllTests():
|
||||||
print('Running tests...')
|
print('Running tests...')
|
||||||
testParseFeedDate()
|
testParseFeedDate()
|
||||||
return
|
|
||||||
testFirstParagraphFromString()
|
testFirstParagraphFromString()
|
||||||
testGetNewswireTags()
|
testGetNewswireTags()
|
||||||
testHashtagRuleTree()
|
testHashtagRuleTree()
|
||||||
|
|
Loading…
Reference in New Issue