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)
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)