'If @api_view is not applied correct, we should raise an assertion.'

def test_api_view_incorrect(self):

    @api_view
    def view(request):
        return Response()
    request = self.factory.get(u'/')
    self.assertRaises(AssertionError, view, request)
