Skip to content

Commit 04d33d2

Browse files
[formrecognizer] unskip receipt/business card tests and re-record with preview.2 (#15270)
* rerecord business card and receipt tests with preview.2 * preface commented out test assertions with FIXME
1 parent a7e0adf commit 04d33d2

File tree

140 files changed

+10379
-838924
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+10379
-838924
lines changed

sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_business_card.test_authentication_bad_key.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ interactions:
1313
Content-Type:
1414
- image/jpeg
1515
User-Agent:
16-
- azsdk-python-ai-formrecognizer/3.1.0b1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit)
16+
- azsdk-python-ai-formrecognizer/3.1.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0)
1717
method: POST
18-
uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyze?includeTextDetails=false
18+
uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.2/prebuilt/businessCard/analyze?includeTextDetails=false
1919
response:
2020
body:
2121
string: '{"error": {"code": "401", "message": "Access denied due to invalid
@@ -25,7 +25,7 @@ interactions:
2525
content-length:
2626
- '224'
2727
date:
28-
- Tue, 06 Oct 2020 18:56:59 GMT
28+
- Wed, 11 Nov 2020 17:49:33 GMT
2929
status:
3030
code: 401
3131
message: PermissionDenied

sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_business_card.test_authentication_successful_key.yaml

+42-16,096
Large diffs are not rendered by default.

sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_business_card.test_blank_page.yaml

+16-16
Original file line numberDiff line numberDiff line change
@@ -464,27 +464,27 @@ interactions:
464464
Content-Type:
465465
- application/pdf
466466
User-Agent:
467-
- azsdk-python-ai-formrecognizer/3.1.0b1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit)
467+
- azsdk-python-ai-formrecognizer/3.1.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0)
468468
method: POST
469-
uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyze?includeTextDetails=false
469+
uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.2/prebuilt/businessCard/analyze?includeTextDetails=false
470470
response:
471471
body:
472472
string: ''
473473
headers:
474474
apim-request-id:
475-
- 0e4fb86f-73cc-4b1d-8c60-f063c19f3481
475+
- 6e6713af-77fc-4c55-a6c6-3f1501081068
476476
content-length:
477477
- '0'
478478
date:
479-
- Tue, 06 Oct 2020 18:57:08 GMT
479+
- Wed, 11 Nov 2020 17:49:42 GMT
480480
operation-location:
481-
- https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyzeResults/0e4fb86f-73cc-4b1d-8c60-f063c19f3481
481+
- https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.2/prebuilt/businessCard/analyzeResults/6e6713af-77fc-4c55-a6c6-3f1501081068
482482
strict-transport-security:
483483
- max-age=31536000; includeSubDomains; preload
484484
x-content-type-options:
485485
- nosniff
486486
x-envoy-upstream-service-time:
487-
- '162'
487+
- '52'
488488
status:
489489
code: 202
490490
message: Accepted
@@ -498,31 +498,31 @@ interactions:
498498
Connection:
499499
- keep-alive
500500
User-Agent:
501-
- azsdk-python-ai-formrecognizer/3.1.0b1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit)
501+
- azsdk-python-ai-formrecognizer/3.1.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0)
502502
method: GET
503-
uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyzeResults/0e4fb86f-73cc-4b1d-8c60-f063c19f3481
503+
uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.2/prebuilt/businessCard/analyzeResults/6e6713af-77fc-4c55-a6c6-3f1501081068
504504
response:
505505
body:
506-
string: '{"status": "succeeded", "createdDateTime": "2020-10-06T18:57:08Z",
507-
"lastUpdatedDateTime": "2020-10-06T18:57:12Z", "analyzeResult": {"version":
508-
"2.1.0", "readResults": [{"page": 1, "angle": 0, "width": 8.4967, "height":
509-
10.9967, "unit": "inch"}], "documentResults": [{"docType": "prebuilt:businesscard",
506+
string: '{"status": "succeeded", "createdDateTime": "2020-11-11T17:49:42Z",
507+
"lastUpdatedDateTime": "2020-11-11T17:49:46Z", "analyzeResult": {"version":
508+
"2.1.0", "readResults": [{"page": 1, "angle": 0, "width": 8.5, "height": 11,
509+
"unit": "inch"}], "documentResults": [{"docType": "prebuilt:businesscard",
510510
"pageRange": [1, 1], "fields": {}}]}}'
511511
headers:
512512
apim-request-id:
513-
- 9f0c028e-acfe-43b6-8c66-55e0aefa199b
513+
- 2bbf38ba-1732-4960-8713-ef7e25d9c079
514514
content-length:
515-
- '313'
515+
- '305'
516516
content-type:
517517
- application/json; charset=utf-8
518518
date:
519-
- Tue, 06 Oct 2020 18:57:13 GMT
519+
- Wed, 11 Nov 2020 17:49:47 GMT
520520
strict-transport-security:
521521
- max-age=31536000; includeSubDomains; preload
522522
x-content-type-options:
523523
- nosniff
524524
x-envoy-upstream-service-time:
525-
- '168'
525+
- '17'
526526
status:
527527
code: 200
528528
message: OK

sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_business_card.test_business_card_continuation_token.yaml

+76-16,130
Large diffs are not rendered by default.

sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_business_card.test_business_card_jpg.yaml

+42-16,096
Large diffs are not rendered by default.

sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_business_card.test_business_card_jpg_include_field_elements.yaml

+117-16,163
Large diffs are not rendered by default.

sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_business_card.test_business_card_locale_error.yaml

+8-16,062
Large diffs are not rendered by default.

sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_business_card.test_business_card_locale_specified.yaml

+42-16,096
Large diffs are not rendered by default.

sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_business_card.test_business_card_multipage_pdf.yaml

+178-3,498
Large diffs are not rendered by default.

sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_business_card.test_business_card_png.yaml

+41-41
Original file line numberDiff line numberDiff line change
@@ -79956,27 +79956,27 @@ interactions:
7995679956
Content-Type:
7995779957
- image/png
7995879958
User-Agent:
79959-
- azsdk-python-ai-formrecognizer/3.1.0b1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit)
79959+
- azsdk-python-ai-formrecognizer/3.1.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0)
7996079960
method: POST
79961-
uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyze?includeTextDetails=false
79961+
uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.2/prebuilt/businessCard/analyze?includeTextDetails=false
7996279962
response:
7996379963
body:
7996479964
string: ''
7996579965
headers:
7996679966
apim-request-id:
79967-
- e173176f-5649-4a0f-a80c-d3a69c989e3d
79967+
- 2bfd1760-7097-4f03-9916-aa8a80097358
7996879968
content-length:
7996979969
- '0'
7997079970
date:
79971-
- Tue, 06 Oct 2020 19:44:19 GMT
79971+
- Wed, 11 Nov 2020 17:50:35 GMT
7997279972
operation-location:
79973-
- https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyzeResults/e173176f-5649-4a0f-a80c-d3a69c989e3d
79973+
- https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.2/prebuilt/businessCard/analyzeResults/2bfd1760-7097-4f03-9916-aa8a80097358
7997479974
strict-transport-security:
7997579975
- max-age=31536000; includeSubDomains; preload
7997679976
x-content-type-options:
7997779977
- nosniff
7997879978
x-envoy-upstream-service-time:
79979-
- '1542'
79979+
- '1106'
7998079980
status:
7998179981
code: 202
7998279982
message: Accepted
@@ -79990,64 +79990,64 @@ interactions:
7999079990
Connection:
7999179991
- keep-alive
7999279992
User-Agent:
79993-
- azsdk-python-ai-formrecognizer/3.1.0b1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit)
79993+
- azsdk-python-ai-formrecognizer/3.1.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0)
7999479994
method: GET
79995-
uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyzeResults/e173176f-5649-4a0f-a80c-d3a69c989e3d
79995+
uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.2/prebuilt/businessCard/analyzeResults/2bfd1760-7097-4f03-9916-aa8a80097358
7999679996
response:
7999779997
body:
79998-
string: '{"status": "succeeded", "createdDateTime": "2020-10-06T19:44:19Z",
79999-
"lastUpdatedDateTime": "2020-10-06T19:44:24Z", "analyzeResult": {"version":
80000-
"2.1.0", "readResults": [{"page": 1, "angle": -17.1052, "width": 4032, "height":
79998+
string: '{"status": "succeeded", "createdDateTime": "2020-11-11T17:50:35Z",
79999+
"lastUpdatedDateTime": "2020-11-11T17:50:39Z", "analyzeResult": {"version":
80000+
"2.1.0", "readResults": [{"page": 1, "angle": -16.693, "width": 4032, "height":
8000180001
3024, "unit": "pixel"}], "documentResults": [{"docType": "prebuilt:businesscard",
8000280002
"pageRange": [1, 1], "fields": {"ContactNames": {"type": "array", "valueArray":
8000380003
[{"type": "object", "valueObject": {"FirstName": {"type": "string", "valueString":
80004-
"Avery", "text": "Avery", "boundingBox": [703, 1096, 1135, 989, 1166, 1108,
80005-
733, 1206], "page": 1}, "LastName": {"type": "string", "valueString": "Smith",
80006-
"text": "Smith", "boundingBox": [1187, 976, 1586, 879, 1619, 998, 1218, 1096],
80007-
"page": 1}}, "text": "Dr. Avery Smith", "boundingBox": [419.5, 1155.5, 1590.5,
80008-
877.9, 1619.7, 1000.8, 448.6, 1278.3], "confidence": 0.794}]}, "JobTitles":
80004+
"Avery", "text": "Avery", "boundingBox": [683, 1098, 1158, 984, 1187, 1103,
80005+
713, 1212], "page": 1}, "LastName": {"type": "string", "valueString": "Smith",
80006+
"text": "Smith", "boundingBox": [1179, 979, 1610, 871, 1638, 990, 1209, 1098],
80007+
"page": 1}}, "text": "Dr. Avery Smith", "boundingBox": [413.9, 1152.1, 1610,
80008+
871, 1639.6, 996.8, 443.5, 1277.9], "page": 1, "confidence": 0.979}]}, "JobTitles":
8000980009
{"type": "array", "valueArray": [{"type": "string", "valueString": "Senior
80010-
Researcher", "text": "Senior Researcher", "boundingBox": [451.8, 1301.9, 1313.5,
80011-
1099.9, 1333.8, 1186.7, 472.2, 1388.7], "page": 1, "confidence": 0.99}]},
80012-
"Departments": {"type": "array", "valueArray": [{"type": "string", "valueString":
80013-
"Cloud & Al Department", "text": "Cloud & Al Department", "boundingBox": [479.5,
80014-
1399.5, 1592, 1129.5, 1614.4, 1221.6, 501.9, 1491.6], "page": 1, "confidence":
80015-
0.99}]}, "Emails": {"type": "array", "valueArray": [{"type": "string", "valueString":
80010+
Researcher", "text": "Senior Researcher", "boundingBox": [446.7, 1312.8, 1323,
80011+
1102, 1341.8, 1180.3, 465.6, 1391.2], "page": 1, "confidence": 0.99}]}, "Departments":
80012+
{"type": "array", "valueArray": [{"type": "string", "valueString": "Cloud
80013+
& Al Department", "text": "Cloud & Al Department", "boundingBox": [472.7,
80014+
1407.2, 1597, 1131, 1618.4, 1218.2, 494.1, 1494.4], "page": 1, "confidence":
80015+
0.989}]}, "Emails": {"type": "array", "valueArray": [{"type": "string", "valueString":
8001680016
"[email protected]", "text": "[email protected]", "boundingBox":
80017-
[2108, 934, 2918, 696, 2936, 763, 2126, 995], "page": 1, "confidence": 0.99}]},
80017+
[2103, 935, 2927, 701, 2939, 763, 2119, 993], "page": 1, "confidence": 0.99}]},
8001880018
"Websites": {"type": "array", "valueArray": [{"type": "string", "valueString":
8001980019
"https://www.contoso.com/", "text": "https://www.contoso.com/", "boundingBox":
80020-
[2121, 1002, 2992, 755, 3014, 826, 2143, 1076], "page": 1, "confidence": 0.995}]},
80020+
[2116, 1004, 2980, 757, 3005, 824, 2136, 1075], "page": 1, "confidence": 0.99}]},
8002180021
"MobilePhones": {"type": "array", "valueArray": [{"type": "phoneNumber", "text":
80022-
"+44 (0) 7911 123456", "boundingBox": [2432.7, 1029.6, 3074, 835, 3098.5,
80023-
915.8, 2457.3, 1110.3], "page": 1, "confidence": 0.99}]}, "OtherPhones": {"type":
80022+
"+44 (0) 7911 123456", "boundingBox": [2431.8, 1037.1, 3079, 843.8, 3100.5,
80023+
915.5, 2453.3, 1108.9], "page": 1, "confidence": 0.99}]}, "OtherPhones": {"type":
8002480024
"array", "valueArray": [{"type": "phoneNumber", "text": "+44 (0) 20 9876 5432",
80025-
"boundingBox": [2473, 1114.8, 3139.3, 907.7, 3163.2, 984.8, 2497, 1191.9],
80026-
"page": 1, "confidence": 0.989}]}, "Faxes": {"type": "array", "valueArray":
80027-
[{"type": "phoneNumber", "text": "+44 (0) 20 6789 2345", "boundingBox": [2526.5,
80028-
1190.4, 3191.2, 978.9, 3216.5, 1058.4, 2551.8, 1269.9], "page": 1, "confidence":
80029-
0.99}]}, "Addresses": {"type": "array", "valueArray": [{"type": "string",
80030-
"valueString": "2 Kingdom Street Paddington, London, W2 6BD", "text": "2 Kingdom
80031-
Street Paddington, London, W2 6BD", "boundingBox": [1230, 2138, 2535, 1678.3,
80032-
2614, 1902.6, 1309, 2362.4], "page": 1, "confidence": 0.977}]}, "CompanyNames":
80033-
{"type": "array", "valueArray": [{"type": "string", "valueString": "Contoso",
80034-
"text": "Contoso", "boundingBox": [1152, 1916, 2293, 1551, 2357, 1733, 1219,
80035-
2105], "page": 1, "confidence": 0.068}]}}}]}}'
80025+
"boundingBox": [2465.2, 1120.4, 3133.9, 911.4, 3156.8, 984.6, 2488.1, 1193.6],
80026+
"page": 1, "confidence": 0.99}]}, "Faxes": {"type": "array", "valueArray":
80027+
[{"type": "phoneNumber", "text": "+44 (0) 20 6789 2345", "boundingBox": [2520.4,
80028+
1195.3, 3196.8, 982.3, 3220.6, 1058, 2544.2, 1271], "page": 1, "confidence":
80029+
0.99}]}, "CompanyNames": {"type": "array", "valueArray": [{"type": "string",
80030+
"valueString": "Contoso", "text": "Contoso", "boundingBox": [1157, 1923, 2306,
80031+
1562, 2368, 1728, 1214, 2098], "page": 1, "confidence": 0.222}]}, "Addresses":
80032+
{"type": "array", "valueArray": [{"type": "string", "valueString": "2 Kingdom
80033+
Street Paddington, London, W2 6BD", "text": "2 Kingdom Street Paddington,
80034+
London, W2 6BD", "boundingBox": [1224.6, 2139.5, 2537.7, 1685.6, 2614.2, 1906.9,
80035+
1301.1, 2360.8], "page": 1, "confidence": 0.979}]}}}]}}'
8003680036
headers:
8003780037
apim-request-id:
80038-
- 1a669449-5504-4c59-822c-a12b754b879c
80038+
- 3595acfc-873b-4c53-a503-22b271ec81ef
8003980039
content-length:
80040-
- '2674'
80040+
- '2682'
8004180041
content-type:
8004280042
- application/json; charset=utf-8
8004380043
date:
80044-
- Tue, 06 Oct 2020 19:44:26 GMT
80044+
- Wed, 11 Nov 2020 17:50:40 GMT
8004580045
strict-transport-security:
8004680046
- max-age=31536000; includeSubDomains; preload
8004780047
x-content-type-options:
8004880048
- nosniff
8004980049
x-envoy-upstream-service-time:
80050-
- '2410'
80050+
- '29'
8005180051
status:
8005280052
code: 200
8005380053
message: OK

0 commit comments

Comments
 (0)