fix usage of patch.object