Skip to content

Commit

Permalink
[formrecognizer] temp disable sample tests until service bug fixed (#…
Browse files Browse the repository at this point in the history
…17036)

* temp disable sample tests until service bug fixed

* change var name
  • Loading branch information
kristapratico authored Mar 2, 2021
1 parent 5d5bbe5 commit 6eee65d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions scripts/devops_tasks/test_run_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@
"receive_deferred_message_queue_async.py",
"receive_iterator_queue_async.py",
"session_pool_receive_async.py"
],
"azure-ai-formrecognizer": [
"sample_recognize_receipts_from_url.py",
"sample_recognize_receipts_from_url_async.py"
]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

class AuthenticationSampleAsync(object):

url = "https://raw.githubusercontent.com/Azure/azure-sdk-for-python/master/sdk/formrecognizer/azure-ai-formrecognizer/tests/sample_forms/receipt/contoso-receipt.png"
url = "https://raw.githubusercontent.com/Azure/azure-sdk-for-python/master/sdk/formrecognizer/azure-ai-formrecognizer/tests/sample_forms/forms/Form_1.jpg"

async def authentication_with_api_key_credential_form_recognizer_client_async(self):
# [START create_fr_client_with_key_async]
Expand All @@ -49,7 +49,7 @@ async def authentication_with_api_key_credential_form_recognizer_client_async(se
form_recognizer_client = FormRecognizerClient(endpoint, AzureKeyCredential(key))
# [END create_fr_client_with_key_async]
async with form_recognizer_client:
poller = await form_recognizer_client.begin_recognize_receipts_from_url(self.url)
poller = await form_recognizer_client.begin_recognize_content_from_url(self.url)
result = await poller.result()

async def authentication_with_azure_active_directory_form_recognizer_client_async(self):
Expand All @@ -66,7 +66,7 @@ async def authentication_with_azure_active_directory_form_recognizer_client_asyn
form_recognizer_client = FormRecognizerClient(endpoint, credential)
# [END create_fr_client_with_aad_async]
async with form_recognizer_client:
poller = await form_recognizer_client.begin_recognize_receipts_from_url(self.url)
poller = await form_recognizer_client.begin_recognize_content_from_url(self.url)
result = await poller.result()

async def authentication_with_api_key_credential_form_training_client_async(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

class AuthenticationSample(object):

url = "https://raw.githubusercontent.com/Azure/azure-sdk-for-python/master/sdk/formrecognizer/azure-ai-formrecognizer/tests/sample_forms/receipt/contoso-receipt.png"
url = "https://raw.githubusercontent.com/Azure/azure-sdk-for-python/master/sdk/formrecognizer/azure-ai-formrecognizer/tests/sample_forms/forms/Form_1.jpg"

def authentication_with_api_key_credential_form_recognizer_client(self):
# [START create_fr_client_with_key]
Expand All @@ -47,8 +47,8 @@ def authentication_with_api_key_credential_form_recognizer_client(self):

form_recognizer_client = FormRecognizerClient(endpoint, AzureKeyCredential(key))
# [END create_fr_client_with_key]
poller = form_recognizer_client.begin_recognize_receipts_from_url(self.url)
receipt = poller.result()
poller = form_recognizer_client.begin_recognize_content_from_url(self.url)
result = poller.result()

def authentication_with_azure_active_directory_form_recognizer_client(self):
# [START create_fr_client_with_aad]
Expand All @@ -63,8 +63,8 @@ def authentication_with_azure_active_directory_form_recognizer_client(self):

form_recognizer_client = FormRecognizerClient(endpoint, credential)
# [END create_fr_client_with_aad]
poller = form_recognizer_client.begin_recognize_receipts_from_url(self.url)
receipt = poller.result()
poller = form_recognizer_client.begin_recognize_content_from_url(self.url)
result = poller.result()

def authentication_with_api_key_credential_form_training_client(self):
# [START create_ft_client_with_key]
Expand Down

0 comments on commit 6eee65d

Please sign in to comment.