This commit is contained in:
Adrià Casajús 2022-03-29 21:03:55 +02:00
parent 77faff5f7c
commit 1555bc6346
No known key found for this signature in database
GPG key ID: F0033226A5AFC9B9
3 changed files with 3 additions and 6 deletions

View file

@ -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

View file

@ -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

View file

@ -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):