mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-07-13 09:32:26 +03:00
Update view test should set user to form instance (#3776)
This commit is contained in:
parent
9ed9909866
commit
c7a8b6498c
|
@ -64,6 +64,7 @@ class TestUserUpdateView:
|
||||||
# Initialize the form
|
# Initialize the form
|
||||||
form = UserAdminChangeForm()
|
form = UserAdminChangeForm()
|
||||||
form.cleaned_data = {}
|
form.cleaned_data = {}
|
||||||
|
form.instance = user
|
||||||
view.form_valid(form)
|
view.form_valid(form)
|
||||||
|
|
||||||
messages_sent = [m.message for m in messages.get_messages(request)]
|
messages_sent = [m.message for m in messages.get_messages(request)]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user