title: How to unit test request.json_body in pyramid?
body: <p>I use the field request.json_body to retrieve the encoded json body like:</p>
  
  <pre><code>@view_config(route_name='reminder', renderer='json', permission='view', xhr=True, request_method='POST')
  def reminder(request):
      process(body.request.json_body)
      return {'result':'OK'}
  </code></pre>
  
  <p>How can I unit test this (I am a python newbie, using 3.4.4). I used DummyRequest() from pyramid testing, but when running the test it complaints:</p>
  
  <pre><code>'DummyRequest' object has no attribute 'json_body'
  </code></pre>
  
  <p>Which I understand as I read that the DummyRequest is restricted.
  And how can I fill the "test" request with some json body?
  I think I am looking in the wrong corners as I can't (google) good info about this :(</p>