Ejemplo n.º 1
0
    def test_creates_a_new_subscription_associating_the_user_and_feed(self):
        feed = ContentFeed()
        feed.get_params = lambda: {}
        subscription = self.subscriber.subscribe(feed)

        self.assertEqual(subscription.subscriber, self.subscriber)
        self.assert_(subscription.feed_record.is_equivalent_to(self.record))
Ejemplo n.º 2
0
    def test_creates_a_new_subscription_associating_the_user_and_feed(self):
        feed = ContentFeed()
        feed.get_params = lambda: {}
        subscription = self.subscriber.subscribe(feed)

        self.assertEqual(subscription.subscriber, self.subscriber)
        self.assert_(subscription.feed_record.is_equivalent_to(self.record))
Ejemplo n.º 3
0
    def test_doesnt_save_subscription_if_commit_is_false(self):
        feed = ContentFeed()
        feed.get_params = lambda: {}
        subscription = self.subscriber.subscribe(feed, commit=False)

        self.assertIsNone(subscription.pk)
Ejemplo n.º 4
0
    def test_doesnt_save_subscription_if_commit_is_false(self):
        feed = ContentFeed()
        feed.get_params = lambda: {}
        subscription = self.subscriber.subscribe(feed, commit=False)

        self.assertIsNone(subscription.pk)