def testCanDeleteFeed(self): url = "http://example.org/atom" s = streamer.Subscription(url=url, hub="http://hub.example.org/", sourceUrl="http://example.org/", key_name=url) s.put() streamer.handleDeleteSubscription(url, hubSubscriber=StubHubSubscriber()) self.assertFalse(Subscription.exists(url))
def testDeletingFeedUnsubscribesFromHub(self): url = "http://example.org/atom" hub="http://hub.example.org/" s = streamer.Subscription(url=url, hub=hub, sourceUrl="http://example.org/", key_name=url) s.put() hubSubscriber=StubHubSubscriber() streamer.handleDeleteSubscription(url, hubSubscriber=hubSubscriber) self.assertEquals(url, hubSubscriber.url) self.assertEquals(hub, hubSubscriber.hub) self.assertEquals('http://streamer-ade.appspot.com/posts', hubSubscriber.callback_url)