diff options
author | François Schmidts <francois.schmidts@gmail.com> | 2015-05-15 00:21:40 +0200 |
---|---|---|
committer | François Schmidts <francois.schmidts@gmail.com> | 2015-05-15 00:22:08 +0200 |
commit | b6603ce4607982590d7d55c0d583809192d84cad (patch) | |
tree | 8aa3c0bf481a67717987af0710540668d3467ab0 /tests/controllers/feed.py | |
parent | adding base unittests (diff) | |
download | newspipe-b6603ce4607982590d7d55c0d583809192d84cad.tar.gz newspipe-b6603ce4607982590d7d55c0d583809192d84cad.tar.bz2 newspipe-b6603ce4607982590d7d55c0d583809192d84cad.zip |
testing special controller methods
Diffstat (limited to 'tests/controllers/feed.py')
-rw-r--r-- | tests/controllers/feed.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/controllers/feed.py b/tests/controllers/feed.py index d8d6378b..924b8ddd 100644 --- a/tests/controllers/feed.py +++ b/tests/controllers/feed.py @@ -8,8 +8,18 @@ class FeedControllerTest(BasePyaggTest): def test_controller(self): feed = FeedController(2).read()[0].dump() - self.assertTrue(3, ArticleController().read(feed_id=feed['id']).count()) + 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 self.assertFalse(0, ArticleController().read(feed_id=feed['id']).count()) + + 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(0, len(FeedController().list_fetchable())) + self.assertEquals(3, + len(FeedController(3).list_fetchable(refresh_rate=0))) + self.assertEquals(5, + len(FeedController().list_fetchable(refresh_rate=0))) |