def test_saving_an_empty_comment_not_stored(self):
#submit a comment to /share_key/save_comment
body = """
"""
request = HTTPRequest(self.get_url('/p/%s/comment' % self.shf.share_key), 'POST', {'Cookie':'_xsrf=%s;sid=%s' % (self.xsrf, self.sid)}, "body=%s&_xsrf=%s" % (url_escape(body), self.xsrf))
self.http_client.fetch(request, self.stop)
response = self.wait()
comments = self.shf.comments()
self.assertEqual(len(comments), 0)
评论列表
文章目录