def send_rpc(self, svc, path, data, **kw):
    svc.response_class = RemoteResponse
    response = svc.test_client().post(path=path, follow_redirects=True,
      data=data, content_type='application/json', headers={
      'Accept': 'application/json',
      'Content-Type': 'application/json',
      # for mimicing jquery ajax requests..
      'X-Requested-With': 'XMLHttpRequest',
    })
    self.assertTrue((response.data and len(response.data) > 0),
      'Call to: "%s" returned no response data.' % (path))
    return response, loads(response.data)
Encode a string as base64 using the "modern" Python interface.
dataset/ETHPy150Open gregorynicholas/flask-protorpc/testutils.py/RpcMixin.send_rpc--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/hashutil.py/base64_b64encode