Skip to content

Commit

Permalink
Remove items-table from RSS database when removing feed.
Browse files Browse the repository at this point in the history
  • Loading branch information
kipe committed Feb 24, 2015
1 parent 6d83503 commit 0e123b9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
1 change: 1 addition & 0 deletions pyfibot/modules/module_rss.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def remove_feed(network, channel, id):
if not f:
return
DATABASE['feeds'].delete(id=f.id)
DATABASE['items_%i' % (f.id)].drop()
return f


Expand Down
9 changes: 0 additions & 9 deletions tests/test_rss.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,23 +65,14 @@ def test_command_remove():
('#pyfibot', 'only "latest" and "list" available for non-admins'),
command_rss(bot, 'pyfibot!pyfibot@example.example.com', '#pyfibot', 'remove')
)


def test_command_remove_2():
eq_(
('#pyfibot', 'syntax: ".rss remove <id from list>"'),
command_rss(bot, ADMIN_USER, '#pyfibot', 'remove')
)


def test_command_remove_3():
eq_(
('#pyfibot', 'feed not found, no action taken'),
command_rss(bot, ADMIN_USER, '#pyfibot', 'remove 123')
)


def test_command_remove_4():
eq_(
('#pyfibot', 'feed "Uutiset - Ampparit.com" <./tests/static/test_rss_check.xml> removed'),
command_rss(bot, ADMIN_USER, '#pyfibot', 'remove 1')
Expand Down

0 comments on commit 0e123b9

Please sign in to comment.