Did I find the right examples for you? yes no

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)

src/k/e/Keystone-0.2.1/test/test_main.py   Keystone(Download)
 
        app = Keystone(self.app_dir)
        template = app.engine.get_template(index)
 
        req = Request(wsgi_environ('GET', '/'))
 
        req = Request(wsgi_environ('GET', '/'))
        template = app.engine.get_template(index)
        response = app.render_keystone(req, template)
 
 
        req = Request(wsgi_environ('GET', '/'))
        template = app.engine.get_template(index)
        response = app.render_keystone(req, template)
        self.assertEqual(response.headers['Set-Cookie'], 'name=value; Path=/')
 
        req = Request(wsgi_environ('GET', '/'))
        template = app.engine.get_template(index)
        response = app.render_keystone(req, template)
        self.assertEqual(response.headers['Set-Cookie'], 'name=; expires=Thu, 01-Jan-1970 00:00:00 GMT; Max-Age=0; Path=/')
 
        req = Request(wsgi_environ('GET', '/'))
        template = app.engine.get_template(index)
        response = app.render_keystone(req, template)
        self.assertTrue('X-Key' in response.headers)