def property_mock(request, cls, prop_name, **kwargs):
    _patch = patch.object(cls, prop_name, new_callable=PropertyMock, **kwargs)
    request.addfinalizer(_patch.stop)
    return _patch.start()
This method has the same purpose as the one in XMLFeedSpider
dataset/ETHPy150Open python-openxml/python-docx/tests/unitutil/mock.py/property_mock--crossover with--dataset/ETHPy150Open scrapy/scrapy/scrapy/spiders/feed.py/CSVFeedSpider.adapt_response