Write tests for all three view classes. Fix a bug.

Tests only check whether views correctly respond to HTTP POST and GET requests.
They do not ensure the views correctly respond to fake PUT and DELETE requests
(POST requests with _method="PUT").