From 1dca52fcfbe466315eed656fe04ef42d5dbf9a75 Mon Sep 17 00:00:00 2001 From: Bharath Chadarajupalli Date: Tue, 20 Feb 2024 15:39:36 -0800 Subject: [PATCH] @W-15055573 - Updated depricated authentication_error --- metecho/oauth2/adapter.py | 2 +- metecho/oauth2/tests/adapter.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/metecho/oauth2/adapter.py b/metecho/oauth2/adapter.py index c492b01c3..13e346864 100644 --- a/metecho/oauth2/adapter.py +++ b/metecho/oauth2/adapter.py @@ -6,7 +6,7 @@ class CustomSocialAccountAdapter(DefaultSocialAccountAdapter): - def authentication_error(self, *args, **kwargs): + def on_authentication_error(self, *args, **kwargs): """Make sure that auth errors get logged""" logger.error(f"Social Account authentication error: {args}, {kwargs}") return super().on_authentication_error(*args, **kwargs) diff --git a/metecho/oauth2/tests/adapter.py b/metecho/oauth2/tests/adapter.py index e32c4cf94..d31d15a8a 100644 --- a/metecho/oauth2/tests/adapter.py +++ b/metecho/oauth2/tests/adapter.py @@ -7,5 +7,5 @@ def test_authentication_error_logs(mocker): ) # noqa error = mocker.patch("metecho.oauth2.adapter.logger.error") adapter = CustomSocialAccountAdapter() - adapter.authentication_error() + adapter.on_authentication_error() assert error.called