Add auth/authorize endpoint (#15887)

This commit is contained in:
Paulus Schoutsen 2018-08-09 09:27:54 +02:00 committed by GitHub
parent 61901496ec
commit 99c4c65f69
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 0 deletions

View file

@ -348,3 +348,14 @@ async def test_onboarding_load(mock_http_client):
"""Test onboarding component loaded by default."""
resp = await mock_http_client.get('/api/onboarding')
assert resp.status == 200
async def test_auth_authorize(mock_http_client):
"""Test the authorize endpoint works."""
resp = await mock_http_client.get('/auth/authorize?hello=world')
assert resp.url.query_string == 'hello=world'
assert resp.url.path == '/frontend_es5/authorize.html'
resp = await mock_http_client.get('/auth/authorize?latest&hello=world')
assert resp.url.query_string == 'latest&hello=world'
assert resp.url.path == '/frontend_latest/authorize.html'