'Test static generation'

def test_static_generation(self):

    nums = list(map(str, xrange(10)))
    def handler(conn):
        return conn.generate_static_output(u'test', nums.pop)
    with TestServer(handler) as server:
        conn = server.connect()
        conn.request(u'GET', u'/an_etagged_path')
        r = conn.getresponse()
        data = r.read()
        for i in xrange(5):
            conn.request(u'GET', u'/an_etagged_path')
            r = conn.getresponse()
            self.assertEqual(data, r.read())
