Beispiel #1
0
 def testCanDeleteSubscription(self):
   url = "http://example.org/atom"
   s = Subscription(url=url, hub="http://hub.example.org/", sourceUrl="http://example.org/", key_name=url)
   s.put()
   self.assertTrue(Subscription.exists(url))
   Subscription.deleteSubscriptionWithMatchingUrl(url)
   self.assertFalse(Subscription.exists(url))
Beispiel #2
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))
Beispiel #3
0
 def testCanTellIfFeedIsNew(self):
   url = "http://example.org/atom"
   self.assertFalse(Subscription.exists(url))
Beispiel #4
0
  def testCanTellIfFeedIsAlreadyStored(self):
    url = "http://example.org/atom"
    s = Subscription(url=url, hub="http://hub.example.org/", sourceUrl="http://example.org/", key_name=url)
    s.put()

    self.assertTrue(Subscription.exists(url))