@request_method_decorator
    def upload_screenshot(self, filename, content, caption=None, **kwargs):
        request = HttpRequest(self._url, method=b'POST', query_args=kwargs)
        request.add_file('path', filename, content)

        if caption:
            request.add_field('caption', caption)

        return request
Test the calling of a service.
dataset/ETHPy150Open reviewboard/rbtools/rbtools/api/resource.py/ScreenshotListResource.upload_screenshot--crossover with--dataset/ETHPy150Open home-assistant/home-assistant/tests/helpers/test_script.py/TestScriptHelper.test_calling_service