django32: check message content directly in the page (#67760)

Which is the point of interest anyway.
https://code.djangoproject.com/ticket/32191 for details on why it is not possible anymore to check the plain text in the response header.
This commit is contained in:
Emmanuel Cazenave 2023-01-11 17:09:05 +01:00 committed by Benjamin Dauvergne
parent 4a1cfa5a16
commit f05596a088
1 changed files with 1 additions and 1 deletions

View File

@ -19,8 +19,8 @@ def test_theme_view(mocked_random, app, admin_user, fake_themes):
assert Variable.objects.filter(name='theme')[0].value == 'alfortville'
assert Variable.objects.filter(name='foo')[0].value == 'bar'
assert resp.location == '/theme/'
assert "The theme has been changed" in dict(resp.headers)['Set-Cookie']
resp = resp.follow()
assert "The theme has been changed" in str(resp.html)
assert resp.form['theme'].value == 'alfortville'
resp.form['theme'].value = 'publik'