Skip to content

[devtools-cognitiveservices] temp fix to allow passing cog key in headers for azure-core#7471

Merged
kristapratico merged 3 commits intoAzure:masterfrom
kristapratico:cogtest-fix
Sep 27, 2019
Merged

[devtools-cognitiveservices] temp fix to allow passing cog key in headers for azure-core#7471
kristapratico merged 3 commits intoAzure:masterfrom
kristapratico:cogtest-fix

Conversation

@kristapratico
Copy link
Contributor

@kristapratico kristapratico commented Sep 27, 2019

Pass in legacy=True to the CognitiveServicesAccountPreparer for msrest. Otherwise will default to cognitiveservices_account_key returned as a string which can be added to the 'Ocp-Apim-Subscription-Key' header.

    @ResourceGroupPreparer()
    @CognitiveServicesAccountPreparer(name_prefix="pycog")
    def test_describe_image(self, resource_group, location, cognitiveservices_account, cognitiveservices_account_key):
        client = ComputerVisionClient(cognitiveservices_account, cognitiveservices_account_key)

@adxsdk6
Copy link

adxsdk6 commented Sep 27, 2019

Can one of the admins verify this patch?

@kristapratico
Copy link
Contributor Author

/azp run python - client

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kristapratico kristapratico merged commit 28bbc3c into Azure:master Sep 27, 2019
iscai-msft added a commit to iscai-msft/azure-sdk-for-python that referenced this pull request Sep 28, 2019
…into base_to_properties

* 'master' of https://github.com/Azure/azure-sdk-for-python:
  Eventhub tracing (Azure#7153)
  [devtools-cognitiveservices] temp fix to allow passing cog key in headers for azure-core (Azure#7471)
  adds back create mgmt client (Azure#7470)
  Update SDK Tools Consumption (Azure#7148)
  [AutoPR] peering/resource-manager (Azure#6923)
  Key Vault: making poller return Certificate or CertificateOperation (Azure#7349)
  Patch os.environ in Identity mock tests (Azure#7452)
  Unskip urllib3 related test (Azure#7442)
YijunXieMS pushed a commit to YijunXieMS/azure-sdk-for-python that referenced this pull request Oct 9, 2019
…ders for azure-core (Azure#7471)

* allow cog key pass in headers

* change param to legacy

* adding legacy param to text analytics test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants