コード例 #1
0
 def test_proxy_no_header(self):
     app = proxy.make_proxy({},
                            'http://localhost:9876',
                            remote_user_header="HTTP_X_REMOTE_USER")
     app = TestApp(app)
     self.server.accept(1)
     res = app.get('/')
     self.assertTrue('Just Foo' in res)
コード例 #2
0
 def test_proxy_no_header(self):
     app = proxy.make_proxy({},
                            'http://localhost:9876',
                            remote_user_header="HTTP_X_REMOTE_USER")
     app = TestApp(app)
     self.server.accept(1)
     res = app.get('/')
     self.assertTrue('Just Foo' in res)
コード例 #3
0
 def test_paste_with_remote_user(self):
     app = proxy.make_proxy({},
                            'http://localhost:9876',
                            remote_user_header="HTTP_X_REMOTE_USER")
     app = TestApp(app)
     self.server.accept(1)
     res = app.get('/', extra_environ={'REMOTE_USER': '******'})
     self.assertTrue('User FooBar' in res)
コード例 #4
0
 def test_paste_with_remote_user(self):
     app = proxy.make_proxy({},
                            'http://localhost:9876',
                            remote_user_header="HTTP_X_REMOTE_USER")
     app = TestApp(app)
     self.server.accept(1)
     res = app.get('/', extra_environ={'REMOTE_USER': '******'})
     self.assertTrue('User FooBar' in res)