Added helper for unit testing class based views