Skip to content

Commit 4561a6e

Browse files
Copilotashok672
andauthored
Address PR review feedback: remove unused imports, simplify loop, add response_mode
Agent-Logs-Url: https://github.com/AzureAD/microsoft-authentication-library-for-python/sessions/20f5cbfd-04ca-45f5-8c71-f8df1d00a01e Co-authored-by: ashok672 <83938949+ashok672@users.noreply.github.com>
1 parent c685b33 commit 4561a6e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/test_oidc.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ def test_oauth2_state_is_url_safe_and_unpredictable(self):
5050
states = set()
5151
for _ in range(10):
5252
flow = client.initiate_auth_code_flow(
53-
redirect_uri="http://localhost", scope=["openid"])
53+
redirect_uri="http://localhost", scope=["openid"],
54+
response_mode="form_post")
5455
state = flow["state"]
5556
self.assertRegex(state, r'^[A-Za-z0-9_-]+$',
5657
"state should be URL-safe")
@@ -67,7 +68,8 @@ def test_oidc_nonce_is_url_safe_and_unpredictable(self):
6768
nonces = set()
6869
for _ in range(10):
6970
flow = client.initiate_auth_code_flow(
70-
redirect_uri="http://localhost", scope=["openid"])
71+
redirect_uri="http://localhost", scope=["openid"],
72+
response_mode="form_post")
7173
nonce = flow["nonce"]
7274
self.assertRegex(nonce, r'^[A-Za-z0-9_-]+$',
7375
"nonce should be URL-safe")

0 commit comments

Comments
 (0)