mirror of
https://github.com/Hopiu/cookiecutter-django.git
synced 2026-05-17 16:51:07 +00:00
Change test to iterate through messages instead of accessing _queued_messages directly
This commit is contained in:
parent
894dbce645
commit
ed69df4403
1 changed files with 5 additions and 1 deletions
|
|
@ -61,7 +61,11 @@ class TestUserUpdateView:
|
|||
form.cleaned_data = []
|
||||
view.form_valid(form)
|
||||
|
||||
assert messages.get_messages(request)._queued_messages[0].message == "Information successfully updated"
|
||||
found_message = False
|
||||
for message in messages.get_messages(request):
|
||||
assert message.message == "Information successfully updated"
|
||||
found_message = True
|
||||
assert found_message
|
||||
|
||||
|
||||
class TestUserRedirectView:
|
||||
|
|
|
|||
Loading…
Reference in a new issue