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)
|
||||
if not client:
|
||||
redirect(url_for("auth.login"))
|
||||
return redirect(url_for("auth.login"))
|
||||
|
||||
# check if redirect_uri is valid
|
||||
# allow localhost by default
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[pytest]
|
||||
addopts =
|
||||
xaddopts =
|
||||
--cov
|
||||
--cov-config coverage.ini
|
||||
--cov-report=html:htmlcov
|
||||
|
|
|
@ -643,10 +643,7 @@ def test_authorize_page_invalid_client_id(flask_client):
|
|||
)
|
||||
|
||||
assert r.status_code == 302
|
||||
assert (
|
||||
r.location
|
||||
== "http://localhost?error=invalid_client_id&client_id=invalid_client_id"
|
||||
)
|
||||
assert r.location == url_for("auth.login")
|
||||
|
||||
|
||||
def test_authorize_page_http_not_allowed(flask_client):
|
||||
|
|
Loading…
Reference in a new issue