class UserSettingsView(LoginRequiredMixin, UserPassesTestMixin, View):

    def test_func(self):
        return test_settings(self.request.user)
How to use the user_passes_test decorator in class based views?