'Sends simulated HTTP POST request to Pecan test app.
:param path: url path of target service
:param params: content for wsgi.input of request
:param expect_errors: boolean value whether an error is expected based
on request
:param headers: A dictionary of headers to send along with the request
:param method: Request method type. Appropriate method function call
should be used rather than passing attribute in.
:param extra_environ: A dictionary of environ variables to send along
with the request
:param status: Expected status code of response'

def post_json(self, path, params, expect_errors=False, headers=None, method='post', extra_environ=None, status=None):

    full_path = (self.PATH_PREFIX + path)
    response = getattr(self.app, ('%s_json' % method))(str(full_path), params=params, headers=headers, status=status, extra_environ=extra_environ, expect_errors=expect_errors)
    return response
