def setUp(self):
    loop = asyncio.new_event_loop()
    asyncio.set_event_loop(loop)
    self._loop = loop
    self._sync_rpc_client = SyncRPCClient(loop=loop, response_timeout=3)
    self._sync_rpc_client._conn_closed_table = {12345: False}
    ServiceRegistry.add_service('test', '0.0.0.0', 0)
    ServiceRegistry._PROXY_CONFIG = {'local_port': 2345, 'cloud_address': 'test', 'proxy_cloud_connections': True}
    self._req_body = GatewayRequest(gwId='test id', authority='mobility', path='/magma.MobilityService/ListAddedIPv4Blocks', headers={'te': 'trailers', 'content-type': 'application/grpc', 'user-agent': 'grpc-python/1.4.0', 'grpc-accept-encoding': 'identity'}, payload=bytes.fromhex('0000000000'))
    self._expected_resp = GatewayResponse(status='400', headers={'test_key': 'test_val'}, payload=b'\x00\x00\x00\x00\n\n\x08')
    self._expected_err_msg = 'test error'
def setUp(self):
    loop = asyncio.new_event_loop()
    asyncio.set_event_loop(loop)
    self._loop = loop
    self._sync_rpc_client = SyncRPCClient(loop=loop, response_timeout=3)
    self._sync_rpc_client._conn_closed_table = {12345: False}
    ServiceRegistry.add_service('test', '0.0.0.0', 0)
    ServiceRegistry._PROXY_CONFIG = {'local_port': 2345, 'cloud_address': 'test', 'proxy_cloud_connections': True}
    self._req_body = GatewayRequest(gwId='test id', authority='mobility', path='/magma.MobilityService/ListAddedIPv4Blocks', headers={'te': 'trailers', 'content-type': 'application/grpc', 'user-agent': 'grpc-python/1.4.0', 'grpc-accept-encoding': 'identity'}, payload=bytes.fromhex('0000000000'))
    self._expected_resp = GatewayResponse(status='400', headers={'test_key': 'test_val'}, payload=b'\x00\x00\x00\x00\n\n\x08')
    self._expected_err_msg = 'test error'