def test_proxy_get():
  """
  Proxying test.
  """
  client = Client()
  # All apps require login.
  client.login(username="test", password="test")
  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("Hello there" in response_get.content)
    assert_true("You requested: /?foo=bar." in response_get.content)
    assert_true("/proxy/127.0.0.1/%s/foo.jpg" % httpd.server_port in response_get.content)
    assert_true(httpd.server_port % "/proxy/127.0.0.1/%s/baz?with=parameter" in response_get.content)
  finally:
    finish()
dataset/ETHPy150Open cloudera/hue/apps/proxy/src/proxy/proxy_test.py/test_proxy_get/swapped operands of `%`