Compare commits
2 Commits
a1c48beb32
...
d78093ab53
Author | SHA1 | Date | |
---|---|---|---|
d78093ab53 | |||
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
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ copyright = '2022, imacat'
|
|||||||
author = 'imacat'
|
author = 'imacat'
|
||||||
|
|
||||||
# The full version, including alpha/beta/rc tags
|
# The full version, including alpha/beta/rc tags
|
||||||
release = '0.2.3'
|
release = '0.2.4'
|
||||||
|
|
||||||
|
|
||||||
# -- General configuration ---------------------------------------------------
|
# -- General configuration ---------------------------------------------------
|
||||||
|
@ -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
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
[metadata]
|
[metadata]
|
||||||
name = flask-digest-auth
|
name = flask-digest-auth
|
||||||
version = 0.2.3
|
version = 0.2.4
|
||||||
author = imacat
|
author = imacat
|
||||||
author_email = imacat@mail.imacat.idv.tw
|
author_email = imacat@mail.imacat.idv.tw
|
||||||
description = The Flask HTTP Digest Authentication project.
|
description = The Flask HTTP Digest Authentication project.
|
||||||
|
@ -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