def test_proxy_server_macro_360_noscope(mocker):
    proxy = TestProxyConnection()

    new_req_contents = 'GET / HTTP/1.1\r\nMangled: Very yes\r\n\r\n'
    new_rsp_contents = 'HTTP/1.1 200 OKILIE DOKILIE\r\nMangled: Very yes\r\n\r\n'
    new_req = Request(new_req_contents)
    new_rsp = Response(new_rsp_contents)
    test_macro = InterceptMacroTest(new_req=new_req, new_rsp=new_rsp)
    proxy.setUp(mocker, int_macros={'test_macro': test_macro}, in_scope=False)
    proxy.write_as_browser('GET /serious.php HTTP/1.1\r\n\r\n')
    assert proxy.read_as_server() == 'GET /serious.php HTTP/1.1\r\n\r\n'
    proxy.write_as_server('HTTP/1.1 404 NOT FOUND\r\n\r\n')
    assert proxy.read_as_browser() == 'HTTP/1.1 404 NOT FOUND\r\n\r\n'
dataset/ETHPy150Open roglew/pappy-proxy/pappyproxy/tests/test_proxy.py/test_proxy_server_macro_360_noscope/original