@@ -0,0 +1,1501 @@
+import requests%0Afrom tornalet import tornalet%0Afrom trequests import setup_session%0Afrom tornado.ioloop import IOLoop%0Afrom tornado.escape import json_decode%0Afrom tornado.testing import AsyncHTTPTestCase%0Afrom tornado.web import Application, RequestHandler%0A%0Asetup_session()%0A%0A%0Aclass TestUtil(object):%0A%0A    def send(self, data):%0A        return requests.post('http://httpbin.org/post', data=data).json()%0A%0A%0Aclass TestHandler(RequestHandler):%0A%0A    @tornalet%0A    def get(self):%0A        util = TestUtil()%0A        data = %7B'foo': 'bar'%7D%0A        response = util.send(data)%0A        self.write(response)%0A%0A%0Aclass TestCase(AsyncHTTPTestCase):%0A%0A    def setUp(self):%0A        self.application = None%0A        super(TestCase, self).setUp()%0A        self.get_app().callback_called = False%0A%0A    def get_new_ioloop(self):%0A        return IOLoop().instance()%0A%0A    def get_app(self):%0A        if not self.application:%0A            self.application = Application(%0A                %5B(r'/', TestHandler)%5D%0A            )%0A%0A        return self.application%0A%0A    def _test_callback(self):%0A        self.get_app().callback_called = True%0A%0A    def test_post(self):%0A        %22%22%22Test using a library that POSTs to requestbin using requests.%0A        %22%22%22%0A%0A        self.get_new_ioloop().add_callback(self._test_callback)%0A        response = self.fetch('/')%0A        data = json_decode(response.body)%0A%0A        self.assertEqual(response.code, 200)%0A        self.assertEqual(data%5B'form'%5D%5B'foo'%5D, 'bar')%0A        self.assertTrue(self.get_app().callback_called)%0A

Add a basic unit test