Fixed the documentation on the pytest example.

This commit is contained in:
依瑪貓 2022-12-06 22:46:52 +08:00
parent a1c48beb32
commit c6b8569543
3 changed files with 6 additions and 6 deletions

View File

@ -379,9 +379,9 @@ A pytest Test
def test_admin(app: Flask, client: Client):
with app.app_context():
response = self.client.get("/admin")
response = client.get("/admin")
assert response.status_code == 401
response = self.client.get(
response = client.get(
"/admin", digest_auth=("my_name", "my_pass"))
assert response.status_code == 200

View File

@ -261,8 +261,8 @@ A pytest Test
def test_admin(app: Flask, client: Client):
with app.app_context():
response = self.client.get("/admin")
response = client.get("/admin")
assert response.status_code == 401
response = self.client.get(
response = client.get(
"/admin", digest_auth=("my_name", "my_pass"))
assert response.status_code == 200

View File

@ -71,9 +71,9 @@ class Client(WerkzeugClient):
def test_admin(app: Flask, client: Client):
with app.app_context():
response = self.client.get("/admin")
response = client.get("/admin")
assert response.status_code == 401
response = self.client.get(
response = client.get(
"/admin", digest_auth=("my_name", "my_pass"))
assert response.status_code == 200
"""