def METHOD_NAME():
  """
  Proxying test.
  """
  # All apps require login.
  client = make_logged_in_client(username="test", is_superuser=True)
  httpd, finish = run_test_server()
  try:
    # Test the proxying
    finish_conf = proxy.conf.WHITELIST.set_for_testing(r"127\.0\.0\.1:\d*")
    try:
      response_get = client.get('/proxy/127.0.0.1/%s/' % httpd.server_port, dict(foo="bar"))
    finally:
      finish_conf()
    assert_true(b"Hello there" in response_get.content)
    assert_true(b"You requested: /?foo=bar." in response_get.content)
    proxy_url = "/proxy/127.0.0.1/%s/foo.jpg" % httpd.server_port
    if not isinstance(proxy_url, bytes):
      proxy_url = proxy_url.encode('utf-8')
    assert_true(proxy_url in response_get.content)
    proxy_url = "/proxy/127.0.0.1/%s/baz?with=parameter" % httpd.server_port
    if not isinstance(proxy_url, bytes):
      proxy_url = proxy_url.encode('utf-8')
    assert_true(proxy_url in response_get.content)
  finally:
    finish()