summaryrefslogtreecommitdiff
path: root/tests_feedgenerator
diff options
context:
space:
mode:
authorEevee (Lexy Munroe) <eevee.git@veekun.com>2016-01-04 15:30:17 -0800
committerEevee (Lexy Munroe) <eevee.git@veekun.com>2016-01-04 15:30:17 -0800
commit33344f6ec9375c0e279fda1583acbcb97e35bac4 (patch)
treeffc328a0a178809ec28e6ac68b40337eea91e193 /tests_feedgenerator
parent9dcf6e12cd9d26b170a36a513dd06d477635c1bf (diff)
downloadfeedgenerator-33344f6ec9375c0e279fda1583acbcb97e35bac4.tar.gz
Support Atom's <content> element
Adds a `content` kwarg to `add_item`, which will become the <content> of an Atom entry. For RSS, which has no equivalent, the content is silently ignored; this is consistent with how Atom ignores metadata like `ttl` that only exists in RSS.
Diffstat (limited to 'tests_feedgenerator')
-rw-r--r--tests_feedgenerator/test_feedgenerator.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests_feedgenerator/test_feedgenerator.py b/tests_feedgenerator/test_feedgenerator.py
index 66441a5..45c64cd 100644
--- a/tests_feedgenerator/test_feedgenerator.py
+++ b/tests_feedgenerator/test_feedgenerator.py
@@ -24,7 +24,8 @@ FIXT_FEED = dict(
FIXT_ITEM = dict(
title="Hello",
link="http://www.holovaty.com/test/",
- description="Testing."
+ description="Testing.",
+ content="Full content of our testing entry.",
)
@@ -36,7 +37,7 @@ EXPECTED_RESULT_RSS = """<?xml version="1.0" encoding="utf-8"?>
</description><language>en</language><lastBuildDate>%DATE%</lastBuildDate><item><title>Hello</title><link>http://www.holovaty.com/test/</link><description>Testing.</description></item></channel></rss>"""
EXPECTED_RESULT_ATOM = """<?xml version="1.0" encoding="utf-8"?>
-<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Poynter E-Media Tidbits</title><link href="http://www.poynter.org/column.asp?id=31" rel="alternate"></link><id>http://www.poynter.org/column.asp?id=31</id><updated>%DATE%</updated><entry><title>Hello</title><link href="http://www.holovaty.com/test/" rel="alternate"></link><id>tag:www.holovaty.com:/test//</id><summary type="html">Testing.</summary></entry></feed>"""
+<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Poynter E-Media Tidbits</title><link href="http://www.poynter.org/column.asp?id=31" rel="alternate"></link><id>http://www.poynter.org/column.asp?id=31</id><updated>%DATE%</updated><entry><title>Hello</title><link href="http://www.holovaty.com/test/" rel="alternate"></link><id>tag:www.holovaty.com:/test//</id><summary type="html">Testing.</summary><content type="html">Full content of our testing entry.</content></entry></feed>"""
ENCODING = 'utf-8'