diff --git a/scripts/devops_tasks/test_run_samples.py b/scripts/devops_tasks/test_run_samples.py index bdfd518b41ab..95ddfec79cf9 100644 --- a/scripts/devops_tasks/test_run_samples.py +++ b/scripts/devops_tasks/test_run_samples.py @@ -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" ] } diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/async_samples/sample_authentication_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/async_samples/sample_authentication_async.py index a1b1ac685d98..3c266c69db27 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/async_samples/sample_authentication_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/async_samples/sample_authentication_async.py @@ -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] @@ -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): @@ -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): diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/sample_authentication.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/sample_authentication.py index 1c1c1dcb872d..ee21ddcec43c 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/sample_authentication.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/sample_authentication.py @@ -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] @@ -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] @@ -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]