diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_views.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_views.py index 52d14606..c2fe8b51 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_views.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_views.py @@ -61,11 +61,8 @@ class TestUserUpdateView: form.cleaned_data = [] view.form_valid(form) - found_message = False - for message in messages.get_messages(request): - assert message.message == "Information successfully updated" - found_message = True - assert found_message + messages_sent = [m.message for m in messages.get_messages(request)] + assert messages_sent == ["Information successfully updated"] class TestUserRedirectView: