you may found `request.notifyFinish` method useful, it is used with the same goal in https://github.com/scrapy/scrapy/blob/master/scrapy/tests/mockserver.py#L48