Refactor test

This commit is contained in:
Bruno Alla 2021-01-24 15:11:15 +00:00
parent 99f6cf35bb
commit 42f33527c5

View File

@ -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: