mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-12-03 05:35:09 +09:00
14 lines
547 B
Python
14 lines
547 B
Python
"""Unexpected failures answer with a generic message; the detail is only logged."""
|
|
from app.services import sso_service
|
|
|
|
|
|
def test_sso_authorize_does_not_echo_exception_text(client, monkeypatch):
|
|
def boom(*a, **kw):
|
|
raise RuntimeError('secret internal path /etc/serverkit/oidc.key')
|
|
monkeypatch.setattr(sso_service, 'generate_auth_url', boom)
|
|
|
|
resp = client.get('/api/v1/sso/authorize/google?redirect_uri=http://localhost/cb')
|
|
|
|
assert resp.status_code == 400
|
|
assert '/etc/serverkit' not in resp.get_data(as_text=True)
|