From fca3ae2222b4a0ea37a9998ef24fd3961c9d9fe2 Mon Sep 17 00:00:00 2001 From: roland Date: Wed, 6 Apr 2022 11:02:19 +0200 Subject: [PATCH] Being explicit on parameters. Fixed tests, spelling error. --- setup.py | 2 +- src/idpyoidc/client/oidc/backchannel_authentication.py | 3 ++- tests/test_server_17_client_authn.py | 2 +- tests/test_server_20d_client_authn.py | 2 +- tests/test_y_actor_01.py | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 2719cb70..94ea8747 100644 --- a/setup.py +++ b/setup.py @@ -65,7 +65,7 @@ def run_tests(self): "idpyoidc/server/oauth2", "idpyoidc/server/oauth2/add_on", "idpyoidc/server/oidc", "idpyoidc/server/oidc/add_on", "idpyoidc/client/oidc", "idpyoidc/client/oidc/add_on", - "idpyoidc/client/provider", + "idpyoidc/client/provider", "idpyoidc/actor", "idpyoidc/client/oauth2", "idpyoidc/client/oauth2/add_on", "idpyoidc/client/oauth2/client_credentials" ], diff --git a/src/idpyoidc/client/oidc/backchannel_authentication.py b/src/idpyoidc/client/oidc/backchannel_authentication.py index 3b0cdbd9..fbe66b51 100644 --- a/src/idpyoidc/client/oidc/backchannel_authentication.py +++ b/src/idpyoidc/client/oidc/backchannel_authentication.py @@ -17,7 +17,8 @@ class BackChannelAuthentication(Service): response_body_type = 'json' def __init__(self, client_get, client_authn_factory=None, conf=None, **kwargs): - super().__init__(client_get, client_authn_factory, conf=conf, **kwargs) + super().__init__(client_get=client_get, conf=conf, + client_authn_factory=client_authn_factory, **kwargs) self.default_request_args = {'scope': ['openid']} self.pre_construct = [] self.post_construct = [] diff --git a/tests/test_server_17_client_authn.py b/tests/test_server_17_client_authn.py index d550f593..5959c714 100644 --- a/tests/test_server_17_client_authn.py +++ b/tests/test_server_17_client_authn.py @@ -711,7 +711,7 @@ class Mock: mock = Mock() conf = dict(CONF) - conf["client_authn_method"] = {"custom": MagicMock(return_value=mock)} + conf["client_authn_methods"] = {"custom": MagicMock(return_value=mock)} conf["endpoint"]["registration"]["kwargs"]["client_authn_method"] = ["custom"] server = Server(conf=conf, keyjar=KEYJAR) server.endpoint_context.cdb[client_id] = {"client_secret": client_secret} diff --git a/tests/test_server_20d_client_authn.py b/tests/test_server_20d_client_authn.py index 4a88373b..211333ba 100755 --- a/tests/test_server_20d_client_authn.py +++ b/tests/test_server_20d_client_authn.py @@ -666,7 +666,7 @@ class Mock: mock = Mock() conf = dict(CONF) - conf["client_authn_method"] = {"custom": MagicMock(return_value=mock)} + conf["client_authn_methods"] = {"custom": MagicMock(return_value=mock)} conf["endpoint"]["registration"]["kwargs"]["client_authn_method"] = ["custom"] server = Server(conf=conf, keyjar=KEYJAR) server.endpoint_context.cdb[client_id] = {"client_secret": client_secret} diff --git a/tests/test_y_actor_01.py b/tests/test_y_actor_01.py index b75d303e..df9cf7f2 100644 --- a/tests/test_y_actor_01.py +++ b/tests/test_y_actor_01.py @@ -344,4 +344,4 @@ def test_query(self): _ninfo = self.actor_1.do_client_notification(_not_req["body"], http_info={"headers": _not_req["headers"]}) - assert _ninfo + assert _ninfo is None