Update view test should set user to form instance (#3776)

This commit is contained in:
Andrew Chen Wang 2022-07-21 19:09:12 -04:00 committed by GitHub
parent 9ed9909866
commit c7a8b6498c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,6 +64,7 @@ class TestUserUpdateView:
# Initialize the form
form = UserAdminChangeForm()
form.cleaned_data = {}
form.instance = user
view.form_valid(form)
messages_sent = [m.message for m in messages.get_messages(request)]