def test_proxy_post():
 client = Client()
 client.login(username='test', password='test')
 (httpd, finish) = run_test_server()
 try:
  finish_conf = proxy.conf.WHITELIST.set_for_testing('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(('foo2=bar' in response_post.content))
 finally:
  finish()

def test_proxy_post ( ) : client = Client ( ) client . login ( username = 'test' , password = 'test' ) ( httpd , finish ) = run_test_server ( ) try : finish_conf = proxy . conf . WHITELIST . set_for_testing ( '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 ( ( 'foo2=bar' in response_post . content ) ) finally : finish ( )
proxying test .