def test_proxy_server_forward_basic(mocker):
    proxy = TestProxyConnection()
    proxy.setUp(mocker)
    req_contents = ('POST /fooo HTTP/1.1\r\n'
                    'Test-Header: foo\r\n'
                    'Content-Length: 4\r\n'
                    'Host: www.AAAA.BBBB\r\n'
                    '\r\n'
                    'ABCD')
    rsp_contents = ('HTTP/1.1 200 OK\r\n\r\n')
    proxy.write_as_browser(req_contents)
    assert proxy.read_as_server() == req_contents
    proxy.write_as_server(rsp_contents)
    assert proxy.read_as_browser() == rsp_contents
    proxy.get_endpoint.assert_called_with('www.AAAA.BBBB', 80, False, socks_config=None, use_http_proxy=True)
    assert proxy.req_save.called
dataset/ETHPy150Open roglew/pappy-proxy/pappyproxy/tests/test_proxy.py/test_proxy_server_forward_basic/original