Skip to content

Commit 6eee65d

Browse files
[formrecognizer] temp disable sample tests until service bug fixed (#17036)
* temp disable sample tests until service bug fixed * change var name
1 parent 5d5bbe5 commit 6eee65d

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

scripts/devops_tasks/test_run_samples.py

+4
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@
7979
"receive_deferred_message_queue_async.py",
8080
"receive_iterator_queue_async.py",
8181
"session_pool_receive_async.py"
82+
],
83+
"azure-ai-formrecognizer": [
84+
"sample_recognize_receipts_from_url.py",
85+
"sample_recognize_receipts_from_url_async.py"
8286
]
8387
}
8488

sdk/formrecognizer/azure-ai-formrecognizer/samples/async_samples/sample_authentication_async.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
class AuthenticationSampleAsync(object):
3939

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

4242
async def authentication_with_api_key_credential_form_recognizer_client_async(self):
4343
# [START create_fr_client_with_key_async]
@@ -49,7 +49,7 @@ async def authentication_with_api_key_credential_form_recognizer_client_async(se
4949
form_recognizer_client = FormRecognizerClient(endpoint, AzureKeyCredential(key))
5050
# [END create_fr_client_with_key_async]
5151
async with form_recognizer_client:
52-
poller = await form_recognizer_client.begin_recognize_receipts_from_url(self.url)
52+
poller = await form_recognizer_client.begin_recognize_content_from_url(self.url)
5353
result = await poller.result()
5454

5555
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
6666
form_recognizer_client = FormRecognizerClient(endpoint, credential)
6767
# [END create_fr_client_with_aad_async]
6868
async with form_recognizer_client:
69-
poller = await form_recognizer_client.begin_recognize_receipts_from_url(self.url)
69+
poller = await form_recognizer_client.begin_recognize_content_from_url(self.url)
7070
result = await poller.result()
7171

7272
async def authentication_with_api_key_credential_form_training_client_async(self):

sdk/formrecognizer/azure-ai-formrecognizer/samples/sample_authentication.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
class AuthenticationSample(object):
3838

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

4141
def authentication_with_api_key_credential_form_recognizer_client(self):
4242
# [START create_fr_client_with_key]
@@ -47,8 +47,8 @@ def authentication_with_api_key_credential_form_recognizer_client(self):
4747

4848
form_recognizer_client = FormRecognizerClient(endpoint, AzureKeyCredential(key))
4949
# [END create_fr_client_with_key]
50-
poller = form_recognizer_client.begin_recognize_receipts_from_url(self.url)
51-
receipt = poller.result()
50+
poller = form_recognizer_client.begin_recognize_content_from_url(self.url)
51+
result = poller.result()
5252

5353
def authentication_with_azure_active_directory_form_recognizer_client(self):
5454
# [START create_fr_client_with_aad]
@@ -63,8 +63,8 @@ def authentication_with_azure_active_directory_form_recognizer_client(self):
6363

6464
form_recognizer_client = FormRecognizerClient(endpoint, credential)
6565
# [END create_fr_client_with_aad]
66-
poller = form_recognizer_client.begin_recognize_receipts_from_url(self.url)
67-
receipt = poller.result()
66+
poller = form_recognizer_client.begin_recognize_content_from_url(self.url)
67+
result = poller.result()
6868

6969
def authentication_with_api_key_credential_form_training_client(self):
7070
# [START create_ft_client_with_key]

0 commit comments

Comments
 (0)