[Answer]-Django testcase post data

1👍

You have directly stored the user passowrd as a plain string self.user.password = 123 but django stores user passwords using hashing algorithm that is why you are receiving the error. You can set user password by using set_password method of user which will apply hashing algorithm before saving it:

user.set_password('123')
user.save()

Leave a comment