Skip to content

Commit fed738d

Browse files
authored
PYTHON-5444 Update OIDC tests use camelCase options (#2436)
1 parent 6ef9135 commit fed738d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

test/asynchronous/test_auth_oidc.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ def get_token(self, username=None):
9292
return fid.read()
9393
elif ENVIRON == "azure":
9494
opts = parse_uri(self.uri_single)["options"]
95-
token_aud = opts["authmechanismproperties"]["TOKEN_RESOURCE"]
95+
token_aud = opts["authMechanismProperties"]["TOKEN_RESOURCE"]
9696
return _get_azure_response(token_aud, username)["access_token"]
9797
elif ENVIRON == "gcp":
9898
opts = parse_uri(self.uri_single)["options"]
99-
token_aud = opts["authmechanismproperties"]["TOKEN_RESOURCE"]
99+
token_aud = opts["authMechanismProperties"]["TOKEN_RESOURCE"]
100100
return _get_gcp_response(token_aud, username)["access_token"]
101101
elif ENVIRON == "k8s":
102102
return _get_k8s_token()
@@ -1108,7 +1108,7 @@ async def test_5_1_azure_with_no_username(self):
11081108
if ENVIRON != "azure":
11091109
raise unittest.SkipTest("Test is only supported on Azure")
11101110
opts = parse_uri(self.uri_single)["options"]
1111-
resource = opts["authmechanismproperties"]["TOKEN_RESOURCE"]
1111+
resource = opts["authMechanismProperties"]["TOKEN_RESOURCE"]
11121112

11131113
props = dict(TOKEN_RESOURCE=resource, ENVIRONMENT="azure")
11141114
client = await self.create_client(authMechanismProperties=props)
@@ -1119,7 +1119,7 @@ async def test_5_2_azure_with_bad_username(self):
11191119
raise unittest.SkipTest("Test is only supported on Azure")
11201120

11211121
opts = parse_uri(self.uri_single)["options"]
1122-
token_aud = opts["authmechanismproperties"]["TOKEN_RESOURCE"]
1122+
token_aud = opts["authMechanismProperties"]["TOKEN_RESOURCE"]
11231123

11241124
props = dict(TOKEN_RESOURCE=token_aud, ENVIRONMENT="azure")
11251125
client = await self.create_client(username="bad", authmechanismproperties=props)

test/test_auth_oidc.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ def get_token(self, username=None):
9292
return fid.read()
9393
elif ENVIRON == "azure":
9494
opts = parse_uri(self.uri_single)["options"]
95-
token_aud = opts["authmechanismproperties"]["TOKEN_RESOURCE"]
95+
token_aud = opts["authMechanismProperties"]["TOKEN_RESOURCE"]
9696
return _get_azure_response(token_aud, username)["access_token"]
9797
elif ENVIRON == "gcp":
9898
opts = parse_uri(self.uri_single)["options"]
99-
token_aud = opts["authmechanismproperties"]["TOKEN_RESOURCE"]
99+
token_aud = opts["authMechanismProperties"]["TOKEN_RESOURCE"]
100100
return _get_gcp_response(token_aud, username)["access_token"]
101101
elif ENVIRON == "k8s":
102102
return _get_k8s_token()
@@ -1106,7 +1106,7 @@ def test_5_1_azure_with_no_username(self):
11061106
if ENVIRON != "azure":
11071107
raise unittest.SkipTest("Test is only supported on Azure")
11081108
opts = parse_uri(self.uri_single)["options"]
1109-
resource = opts["authmechanismproperties"]["TOKEN_RESOURCE"]
1109+
resource = opts["authMechanismProperties"]["TOKEN_RESOURCE"]
11101110

11111111
props = dict(TOKEN_RESOURCE=resource, ENVIRONMENT="azure")
11121112
client = self.create_client(authMechanismProperties=props)
@@ -1117,7 +1117,7 @@ def test_5_2_azure_with_bad_username(self):
11171117
raise unittest.SkipTest("Test is only supported on Azure")
11181118

11191119
opts = parse_uri(self.uri_single)["options"]
1120-
token_aud = opts["authmechanismproperties"]["TOKEN_RESOURCE"]
1120+
token_aud = opts["authMechanismProperties"]["TOKEN_RESOURCE"]
11211121

11221122
props = dict(TOKEN_RESOURCE=token_aud, ENVIRONMENT="azure")
11231123
client = self.create_client(username="bad", authmechanismproperties=props)

0 commit comments

Comments
 (0)