wrap_view decorator for composing views.
WIP.
Changes required as part of the pytest refactor.