def test_ping(self): response = blogsearch.ping( name='Official Google Blog', url='http://googleblog.blogspot.com', changesURL='http://googleblog.blogspot.com/atom.xml') expected = 'Thanks for the ping.' self.assertEquals(response, expected)
site.open += 1 site.put() return edit edit = db.run_in_transaction(put_edit) # queue to inserts to bloom taskqueue.add( url="/tasks/edits/url_sha1_bloom/insert.json", params=dict( url_sha1=edit.url_sha1, ), ) # clear cache handler.invalidate() # fiddle user's count edit.author.open += 1 edit.author.put() # tweet edit.tweet() # ping blogsearch host_url = 'http://%s' % handler.host() changes_url = '%s.atom' % host_url blogsearch.ping(name=site_name(), url=host_url, changesURL=changes_url) handler.redirect(edit.permalink())