File tree 1 file changed +2
-2
lines changed
sdk/core/azure-core/tests
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -150,14 +150,14 @@ def test_key_vault_regression():
150
150
def test_azure_key_credential_policy ():
151
151
"""Tests to see if we can create an AzureKeyCredentialPolicy"""
152
152
def verify_authorization_header (request ):
153
- assert request .http_request . headers ["api_key" ] == "test_key"
153
+ assert request .headers ["api_key" ] == "test_key"
154
154
api_key = "test_key"
155
155
key_header = "api_key"
156
156
157
157
transport = Mock (send = verify_authorization_header )
158
158
credential = AzureKeyCredential (api_key )
159
159
credential_policy = AzureKeyCredentialPolicy (credential = credential , name = key_header )
160
- pipeline = Pipeline (transport = Mock () , policies = [credential_policy ])
160
+ pipeline = Pipeline (transport = transport , policies = [credential_policy ])
161
161
162
162
pipeline .run (HttpRequest ("GET" , "https://test_key_credential" ))
163
163
You can’t perform that action at this time.
0 commit comments