providers/oauth2: fix tests
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
18f450bd49
commit
f391c33bdf
|
@ -72,7 +72,7 @@ def sentry_init(**sentry_init_kwargs):
|
|||
],
|
||||
before_send=before_send,
|
||||
release=f"authentik@{__version__}",
|
||||
**kwargs
|
||||
**kwargs,
|
||||
)
|
||||
set_tag("authentik.build_hash", get_build_hash("tagged"))
|
||||
set_tag("authentik.env", get_env())
|
||||
|
@ -82,6 +82,7 @@ def sentry_init(**sentry_init_kwargs):
|
|||
env=kwargs["environment"],
|
||||
)
|
||||
|
||||
|
||||
def before_send(event: dict, hint: dict) -> Optional[dict]:
|
||||
"""Check if error is database error, and ignore if so"""
|
||||
# pylint: disable=no-name-in-module
|
||||
|
|
|
@ -13,4 +13,4 @@ class TestSentry(TestCase):
|
|||
|
||||
def test_error_sent(self):
|
||||
"""Test error sent"""
|
||||
self.assertEqual(None, before_send({}, {"exc_info": (0, ValueError(), 0)}))
|
||||
self.assertEqual({}, before_send({}, {"exc_info": (0, ValueError(), 0)}))
|
||||
|
|
|
@ -292,6 +292,7 @@ class TestAuthorize(OAuthTestCase):
|
|||
"component": "ak-stage-autosubmit",
|
||||
"type": ChallengeTypes.NATIVE.value,
|
||||
"url": "http://localhost",
|
||||
"title": "Redirecting to app...",
|
||||
"attrs": {
|
||||
"access_token": token.access_token,
|
||||
"id_token": provider.encode(token.id_token.to_dict()),
|
||||
|
|
Reference in New Issue