django32: honor django's generated error formats (#67760)

This commit is contained in:
Emmanuel Cazenave 2023-01-12 16:24:14 +01:00 committed by Benjamin Dauvergne
parent 3ac54aa650
commit b9e4dab140
1 changed files with 2 additions and 2 deletions

View File

@ -22,12 +22,12 @@ def test_internalipmiddleware(app, tenants, settings):
settings.DEBUG_PROPAGATE_EXCEPTIONS = False
app.get('/?raise', status=404)
response = app.get('/?raise', status=500, extra_environ={'HTTP_HOST': tenants[0].domain_url})
assert response.text == '<h1>Server Error (500)</h1>'
assert 'Server Error (500)' in response.text
settings.INTERNAL_IPS = ['127.0.0.1']
response = app.get('/?raise', status=500, extra_environ={'HTTP_HOST': tenants[0].domain_url})
assert 'You\'re seeing this error because you have' in response.text
assert 'seeing this error because you have' in response.text
def test_samesite_middleware(app, tenants, settings):