'Simulates a request to `self.api`.
Args:
path (str): The path to request.
Keyword Arguments:
decode (str): If this is set to a character encoding,
such as \'utf-8\', `simulate_request` will assume the
response is a single byte string, and will decode it as the
result of the request, rather than simply returning the
standard WSGI iterable.
kwargs (optional): Same as those defined for
`falcon.testing.create_environ`.'

def simulate_request(self, path, decode=None, **kwargs):

    if (not path):
        path = '/'
    result = self.api(create_environ(path=path, **kwargs), self.srmock)
    if (decode is not None):
        if (not result):
            return ''
        return result[0].decode(decode)
    return result
