In Django testing, form.save gets a kwarg. How can I test this?
def save(self, **kwargs):
user = super(UserCreationForm, self).save(commit=False)
user.email = kwargs.pop('email')
user.set_password(self.cleaned_data['password1'])
user.save()
return user
Aucun commentaire:
Enregistrer un commentaire