Projet

Général

Profil

0003-django32-check-message-content-directly-in-the-page-.patch

Emmanuel Cazenave, 16 janvier 2023 17:38

Télécharger (1,15 ko)

Voir les différences:

Subject: [PATCH 3/6] 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.
 tests/test_theme.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/test_theme.py
19 19
    assert Variable.objects.filter(name='theme')[0].value == 'alfortville'
20 20
    assert Variable.objects.filter(name='foo')[0].value == 'bar'
21 21
    assert resp.location == '/theme/'
22
    assert "The theme has been changed" in dict(resp.headers)['Set-Cookie']
23 22
    resp = resp.follow()
23
    assert "The theme has been changed" in str(resp.html)
24 24
    assert resp.form['theme'].value == 'alfortville'
25 25

  
26 26
    resp.form['theme'].value = 'publik'
27
-