Skip to content

Commit 3bca938

Browse files
committed
moved test to transport mock
1 parent e8d8886 commit 3bca938

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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

+2-3
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,10 @@ def verify_authorization_header(request):
154154
api_key = "test_key"
155155
key_header = "api_key"
156156

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

163162
pipeline.run(HttpRequest("GET", "https://test_key_credential"))
164163

0 commit comments

Comments
 (0)