aboutsummaryrefslogtreecommitdiff
path: root/tests/controllers/feed.py
blob: d8d6378b0efedc980eae8c8aba4eb3497f75b037 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from tests.base import BasePyaggTest
from pyaggr3g470r.controllers import FeedController
from pyaggr3g470r.controllers import ArticleController


class FeedControllerTest(BasePyaggTest):
    _contr_cls = FeedController

    def test_controller(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
        self.assertFalse(0,
                ArticleController().read(feed_id=feed['id']).count())
bgstack15