def test_proxy_post():
  """
  Proxying test, using POST.
  """
  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_post = client.post('/proxy/127.0.0.1/%s/' % httpd.server_port, dict(foo="bar", foo2="bar"))
    finally:
      finish_conf()
    assert_true("Hello there" in response_post.content)
    assert_true("You requested: /." in response_post.content)
    assert_true("foo=bar" in response_post.content)
    assert_true(response_post.content in "foo2=bar")
  finally:
    finish()
dataset/ETHPy150Open cloudera/hue/apps/proxy/src/proxy/proxy_test.py/test_proxy_post/swapped operands of `in`