docs/testing.rst: fix follow_redirects sample code

This commit is contained in:
Arnout Engelen 2023-10-20 17:17:24 +02:00
parent 541bc8dfc2
commit bb9937593d
No known key found for this signature in database
GPG key ID: 061107B0F74A6DAA

View file

@ -192,7 +192,7 @@ which records the request that produced that response.
.. code-block:: python
def test_logout_redirect(client):
response = client.get("/logout")
response = client.get("/logout", follow_redirects=True)
# Check that there was one redirect response.
assert len(response.history) == 1
# Check that the second request was to the index page.