This fixes some small issues with the unit tests and adding a test case
to the Makefile so that all tests can easily be invoked by running:
make test
Signed-off-by: Lars Kiesow <lkiesow@uos.de>
This merges in a pull request by snipem brining in some unit tests and
bug fixes:
---
Unit tests
I've created unit tests for the module, especially for feeds and
entries. Whilst entry tests aren't fully implemented yet, unit test
cases for feed creation are complete and working. They cover the
creation of a full blown feed in Atom and RSS.
Bugs fixed
Thanks to the unit test cases, I was able to discover three bugs
concerning the fields domain, ttl and skipHours. According to the
lastest test results, they are resolved and working with both Python 2
and Python 3.
Travis support
Additionally, I've added Travis support. Which is a Continuous
Integration platform powering Github.
---
Signed-off-by: Lars Kiesow <lkiesow@uos.de>
In the context of RSS cloud domain was spelled incorrectly as ‚donain‘
which resulted in an error while unit testing. Additionally, also in
RSS ttl (Time to live) wasn’t transformed to a string.
The introduced way of printing things in python3 would work for byte
arrays but not for simple strings. This patch fixes this issue.
Signed-off-by: Lars Kiesow <lkiesow@uos.de>
Fixes traceback
lib/python2.7/site-packages/feedgen/feed.py", line 447, in lastBuildDate
return updated( lastBuildDate )
NameError: global name 'updated' is not defined
Now the content element now supports the type attribute and the content
is encoded accordingly:
- text and html are escaped
- xhtml is surrounded with a div and then included as XML
- XML is directly included
- base64 support was *not* added. Please file a bug if you need it