mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 12:49:24 +01:00
RSS: When deleting a named feed, preserve anonymous feed of the same URL.
This commit is contained in:
parent
cbd2b31d8f
commit
0c8e455b4e
@ -287,7 +287,9 @@ class RSS(callbacks.Plugin):
|
||||
|
||||
def register_feed(self, name, url, initial,
|
||||
plugin_is_loading, announced=None):
|
||||
self.feed_names[name] = url
|
||||
if name != url:
|
||||
# If name == url, then it's an anonymous feed
|
||||
self.feed_names[name] = url
|
||||
self.feeds[url] = Feed(name, url, initial,
|
||||
plugin_is_loading, announced)
|
||||
|
||||
|
@ -111,6 +111,7 @@ class RSSTestCase(ChannelPluginTestCase):
|
||||
self.assertNotError('rss announce remove http://xkcd.com/rss.xml')
|
||||
self.assertNotError('rss remove xkcd')
|
||||
self.assertEqual(self.irc.getCallback('RSS').feed_names, {})
|
||||
self.assertTrue(self.irc.getCallback('RSS').get_feed('http://xkcd.com/rss.xml'))
|
||||
|
||||
@mock_urllib
|
||||
def testInitialAnnounceNewest(self, mock):
|
||||
|
Loading…
Reference in New Issue
Block a user