diff --git a/feedgen/ext/geo.py b/feedgen/ext/geo.py index 1f31a2b..b6384d4 100644 --- a/feedgen/ext/geo.py +++ b/feedgen/ext/geo.py @@ -12,9 +12,10 @@ from feedgen.ext.base import BaseExtension + class GeoExtension(BaseExtension): '''FeedGenerator extension for Simple GeoRSS. ''' def extend_ns(self): - return { 'georss' : 'http://www.georss.org/georss' } + return {'georss': 'http://www.georss.org/georss'} diff --git a/feedgen/ext/geo_entry.py b/feedgen/ext/geo_entry.py index f57fe26..8c9dd15 100644 --- a/feedgen/ext/geo_entry.py +++ b/feedgen/ext/geo_entry.py @@ -13,6 +13,7 @@ from lxml import etree from feedgen.ext.base import BaseEntryExtension + class GeoEntryExtension(BaseEntryExtension): '''FeedEntry extension for Simple GeoRSS. ''' @@ -45,7 +46,7 @@ class GeoEntryExtension(BaseEntryExtension): '''Get or set the georss:point of the entry. :param point: The GeoRSS formatted point (i.e. "42.36 -71.05") - :returns: The author of the podcast. + :returns: The current georss:point of the entry. ''' if point is not None: diff --git a/tests/test_extension.py b/tests/test_extension.py index 2c1146d..db85c08 100644 --- a/tests/test_extension.py +++ b/tests/test_extension.py @@ -136,6 +136,7 @@ class TestExtensionPodcast(unittest.TestCase): namespaces=ns) assert author == ['Lars Kiesow'] + class TestExtensionGeo(unittest.TestCase): def setUp(self): @@ -156,7 +157,7 @@ class TestExtensionGeo(unittest.TestCase): ns = {'georss': 'http://www.georss.org/georss'} root = etree.fromstring(self.fg.rss_str()) point = root.xpath('/rss/channel/item/georss:point/text()', - namespaces=ns) + namespaces=ns) assert point == ['42.36 -71.05']