diff options
author | Cédric Bonhomme <kimble.mandel+bitbucket@gmail.com> | 2015-07-02 18:56:27 +0200 |
---|---|---|
committer | Cédric Bonhomme <kimble.mandel+bitbucket@gmail.com> | 2015-07-02 18:56:27 +0200 |
commit | b43010d2da88d91e8934ba7214a823453cbf6031 (patch) | |
tree | 6e8e1fd8d45832a59f8ec37e2009cc68069f2375 /tests/controllers/feed.py | |
parent | Display a picto when a feed is disabled due to errors when retrieving. (diff) | |
parent | using conf.DEFAULT_MAX_ERROR in feed template (diff) | |
download | newspipe-b43010d2da88d91e8934ba7214a823453cbf6031.tar.gz newspipe-b43010d2da88d91e8934ba7214a823453cbf6031.tar.bz2 newspipe-b43010d2da88d91e8934ba7214a823453cbf6031.zip |
Merged in jaesivsm/pyaggr3g470r (pull request #14)
Master
Diffstat (limited to 'tests/controllers/feed.py')
-rw-r--r-- | tests/controllers/feed.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/controllers/feed.py b/tests/controllers/feed.py index 924b8ddd..863ac0bb 100644 --- a/tests/controllers/feed.py +++ b/tests/controllers/feed.py @@ -6,18 +6,24 @@ from pyaggr3g470r.controllers import ArticleController class FeedControllerTest(BasePyaggTest): _contr_cls = FeedController - def test_controller(self): + def test_feed_rights(self): feed = FeedController(2).read()[0].dump() self.assertTrue(3, ArticleController().read(feed_id=feed['id']).count()) self._test_controller_rights(feed, feed['user_id']) # checking articles are deleted after the feed has been deleted + + 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()) + def test_feed_list_fetchable(self): self.assertEquals(3, len(FeedController(3).list_fetchable())) self.assertEquals(0, len(FeedController(3).list_fetchable())) - self.assertEquals(2, len(FeedController().list_fetchable())) + self.assertEquals(3, len(FeedController().list_fetchable())) self.assertEquals(0, len(FeedController().list_fetchable())) self.assertEquals(3, len(FeedController(3).list_fetchable(refresh_rate=0))) |