forked from orbit-oss/flask
docs/testing.rst: fix follow_redirects sample code
This commit is contained in:
parent
541bc8dfc2
commit
bb9937593d
1 changed files with 1 additions and 1 deletions
|
|
@ -192,7 +192,7 @@ which records the request that produced that response.
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
def test_logout_redirect(client):
|
def test_logout_redirect(client):
|
||||||
response = client.get("/logout")
|
response = client.get("/logout", follow_redirects=True)
|
||||||
# Check that there was one redirect response.
|
# Check that there was one redirect response.
|
||||||
assert len(response.history) == 1
|
assert len(response.history) == 1
|
||||||
# Check that the second request was to the index page.
|
# Check that the second request was to the index page.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue