I have a base view that is defined as following:
class EditProfileMixin(LoginRequiredMixin, UpdateView):
def get_object(self, *args, **kwargs):
return self.request.user
I am inheriting from this view for any action that requires user to be logged in to update any private information ( contact details etc.), and test those views for the same functionality ( user is logged in and get_object returns the right information.
however , I feel that I am doing it wrong because the tests seems redundant to me ... what is the right way of testing this kind of inheritance ?
Aucun commentaire:
Enregistrer un commentaire