Closed elelay closed 7 years ago
For atom, updated is mandatory, published optional, according to the spec,
Looks like the unit tests fail:
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/virtualenv/python3.6-dev/lib/python3.6/site-packages/nose/case.py", line 198, in runTest
self.test(*self.arg)
File "/home/travis/build/gpodder/podcastparser/test_podcastparser.py", line 46, in test_parse_rss
assert_equal(expected, parsed)
AssertionError: {'episodes': [{'description': '', 'enclosur[239 chars]eed'} != {'title': 'Example Feed', 'episodes': [{'de[239 chars]a'}]}
{'episodes': [{'description': '',
'enclosures': [],
'guid': 'urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a',
'link': 'http://example.org/2003/12/13/atom03',
'payment_url': None,
- 'published': 1071336602,
? ^^^
+ 'published': 1071340202,
? ^^^
'title': 'Atom-Powered Robots Run Amok',
'total_time': 0}],
'title': 'Example Feed'}
Can you fixup the test data?
Looks like there's still some timezone offset, but then it should be good to go in once that's fixed.
That's 1 less todo :-) Couldn't make the tests pass locally and on travis without tz
Cool, thanks :)
Looks like it's the way to do it in podcastparser. I need this for https://www.c3d2.de/news-atom.xml otherwise I get published = 1 jan. 1970