Fixed the documentation on the pytest example.
This commit is contained in:
parent
a1c48beb32
commit
c6b8569543
@ -379,9 +379,9 @@ A pytest Test
|
|||||||
|
|
||||||
def test_admin(app: Flask, client: Client):
|
def test_admin(app: Flask, client: Client):
|
||||||
with app.app_context():
|
with app.app_context():
|
||||||
response = self.client.get("/admin")
|
response = client.get("/admin")
|
||||||
assert response.status_code == 401
|
assert response.status_code == 401
|
||||||
response = self.client.get(
|
response = client.get(
|
||||||
"/admin", digest_auth=("my_name", "my_pass"))
|
"/admin", digest_auth=("my_name", "my_pass"))
|
||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
|
|
||||||
|
@ -261,8 +261,8 @@ A pytest Test
|
|||||||
|
|
||||||
def test_admin(app: Flask, client: Client):
|
def test_admin(app: Flask, client: Client):
|
||||||
with app.app_context():
|
with app.app_context():
|
||||||
response = self.client.get("/admin")
|
response = client.get("/admin")
|
||||||
assert response.status_code == 401
|
assert response.status_code == 401
|
||||||
response = self.client.get(
|
response = client.get(
|
||||||
"/admin", digest_auth=("my_name", "my_pass"))
|
"/admin", digest_auth=("my_name", "my_pass"))
|
||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
|
@ -71,9 +71,9 @@ class Client(WerkzeugClient):
|
|||||||
|
|
||||||
def test_admin(app: Flask, client: Client):
|
def test_admin(app: Flask, client: Client):
|
||||||
with app.app_context():
|
with app.app_context():
|
||||||
response = self.client.get("/admin")
|
response = client.get("/admin")
|
||||||
assert response.status_code == 401
|
assert response.status_code == 401
|
||||||
response = self.client.get(
|
response = client.get(
|
||||||
"/admin", digest_auth=("my_name", "my_pass"))
|
"/admin", digest_auth=("my_name", "my_pass"))
|
||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user