'This test would fail if permission is checked **after** view is
actually resolved.'

def test_permission_is_checked_before_view_is_computed(self):

    request = self.factory.get(u'/')
    request.user = self.user
    view = TestView.as_view(object=self.post)
    response = view(request)
    self.assertEqual(response.status_code, 302)
    TestView.get_object = (lambda instance: self.post)
    view = TestView.as_view()
    response = view(request)
    self.assertEqual(response.status_code, 302)
    del TestView.get_object
