Skip to content

Commit 4cb756c

Browse files
committed
[GPCAPIM-395]: Clean up logging and improve session handling in APIM stubs
1 parent c2e4052 commit 4cb756c

2 files changed

Lines changed: 0 additions & 10 deletions

File tree

  • gateway-api

gateway-api/src/gateway_api/apim_app_auth/apim.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,10 @@
2323
def _make_session_post(
2424
session: requests.Session, endpoint: str, data: dict[str, str]
2525
) -> requests.Response:
26-
print("DaveW: in _make_session_post STUB_APIM_APP_AUTH", STUB_APIM_APP_AUTH)
2726
if not STUB_APIM_APP_AUTH:
28-
print("DaveW: in if ", session.post)
2927
return session.post(endpoint, data=data)
3028
else:
3129
stub = APIMAppAuthStub()
32-
print("Dave W: in _make_session_post, stub:", stub.session_post)
33-
print(
34-
"Dave W: in _make_session_post, session_post:",
35-
stub.session_post(session, endpoint, data),
36-
)
3730
response = stub.session_post(session, endpoint, data)
3831
return response
3932

gateway-api/stubs/stubs/apim_app_auth/stub.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
The stub does **not** implement the full APIM APP Auth API surface.
55
"""
66

7-
import logging
87
from typing import Any
98

109
from requests import Response, Session
@@ -60,8 +59,6 @@ def session_post(
6059
data: str | dict[str, str], # noqa: ARG002 - required to match subclass signature
6160
**kwargs: Any, # noqa: ARG002 - required to match subclass signature
6261
) -> Response:
63-
logger = logging.getLogger(__name__)
64-
logger.info("DaveW in stub session_post data: %s", data)
6562
if session is None:
6663
raise ValueError("Session must be provided for APIMAppAuthStub")
6764

0 commit comments

Comments
 (0)