def delete(feed_id=None): feed_contr = FeedController(g.user.id) feed = feed_contr.get(id=feed_id) feed_contr.delete(feed_id) flash(gettext("Feed %(feed_title)s successfully deleted.", feed_title=feed.title), 'success') return redirect(url_for('home'))
def delete(feed_id=None): feed_contr = FeedController(current_user.id) feed = feed_contr.get(id=feed_id) feed_contr.delete(feed_id) flash( gettext("Feed %(feed_title)s successfully deleted.", feed_title=feed.title), 'success') return redirect(url_for('home'))
def test_feed_article_deletion(self): feed_ctr = FeedController(2) feed = feed_ctr.read()[0].dump() feed_ctr.delete(feed['id']) self.assertFalse(0, ArticleController().read(feed_id=feed['id']).count())