Mock as_view when testing view class methods

Mock the ``as_view()`` method of a class-based view when
unit testing methods of a view class in order to properly
bind the view arguments and keyword arguments.

See http://tech.novapost.fr/django-unit-test-your-views-en.html