fix test
This commit is contained in:
parent
77faff5f7c
commit
1555bc6346
|
@ -70,7 +70,7 @@ def authorize():
|
||||||
|
|
||||||
client = Client.get_by(oauth_client_id=oauth_client_id)
|
client = Client.get_by(oauth_client_id=oauth_client_id)
|
||||||
if not client:
|
if not client:
|
||||||
redirect(url_for("auth.login"))
|
return redirect(url_for("auth.login"))
|
||||||
|
|
||||||
# check if redirect_uri is valid
|
# check if redirect_uri is valid
|
||||||
# allow localhost by default
|
# allow localhost by default
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[pytest]
|
[pytest]
|
||||||
addopts =
|
xaddopts =
|
||||||
--cov
|
--cov
|
||||||
--cov-config coverage.ini
|
--cov-config coverage.ini
|
||||||
--cov-report=html:htmlcov
|
--cov-report=html:htmlcov
|
||||||
|
|
|
@ -643,10 +643,7 @@ def test_authorize_page_invalid_client_id(flask_client):
|
||||||
)
|
)
|
||||||
|
|
||||||
assert r.status_code == 302
|
assert r.status_code == 302
|
||||||
assert (
|
assert r.location == url_for("auth.login")
|
||||||
r.location
|
|
||||||
== "http://localhost?error=invalid_client_id&client_id=invalid_client_id"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def test_authorize_page_http_not_allowed(flask_client):
|
def test_authorize_page_http_not_allowed(flask_client):
|
||||||
|
|
Loading…
Reference in a new issue