Skip to content

Commit 8767663

Browse files
committed
fixed test
1 parent 9075714 commit 8767663

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sdk/core/azure-core/tests/test_authentication.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,14 @@ def test_key_vault_regression():
150150
def test_azure_key_credential_policy():
151151
"""Tests to see if we can create an AzureKeyCredentialPolicy"""
152152
def verify_authorization_header(request):
153-
assert request.http_request.headers["api_key"] == "test_key"
153+
assert request.headers["api_key"] == "test_key"
154154
api_key = "test_key"
155155
key_header = "api_key"
156156

157157
transport=Mock(send=verify_authorization_header)
158158
credential = AzureKeyCredential(api_key)
159159
credential_policy = AzureKeyCredentialPolicy(credential=credential, name=key_header)
160-
pipeline = Pipeline(transport=Mock(), policies=[credential_policy])
160+
pipeline = Pipeline(transport=transport, policies=[credential_policy])
161161

162162
pipeline.run(HttpRequest("GET", "https://test_key_credential"))
163163

0 commit comments

Comments
 (0)