示例#1
0
  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))
示例#2
0
  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)