Skip to content

[formrecognizer] uncomment receipt test assertions - service regression fixed #15345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ interactions:
content-length:
- '224'
date:
- Wed, 11 Nov 2020 18:03:28 GMT
- Mon, 16 Nov 2020 19:08:57 GMT
status:
code: 401
message: PermissionDenied
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ interactions:
string: ''
headers:
apim-request-id:
- fd0ce4b0-afb2-47bc-887d-863aa0e76163
- 1ff5365d-b8b3-4448-af6d-93b5f1e9a8e4
content-length:
- '0'
date:
- Wed, 11 Nov 2020 18:03:31 GMT
- Mon, 16 Nov 2020 19:08:58 GMT
operation-location:
- https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.2/prebuilt/receipt/analyzeResults/fd0ce4b0-afb2-47bc-887d-863aa0e76163
- https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.2/prebuilt/receipt/analyzeResults/1ff5365d-b8b3-4448-af6d-93b5f1e9a8e4
strict-transport-security:
- max-age=31536000; includeSubDomains; preload
x-content-type-options:
- nosniff
x-envoy-upstream-service-time:
- '1385'
- '677'
status:
code: 202
message: Accepted
Expand All @@ -50,65 +50,65 @@ interactions:
User-Agent:
- azsdk-python-ai-formrecognizer/3.1.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0)
method: GET
uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.2/prebuilt/receipt/analyzeResults/fd0ce4b0-afb2-47bc-887d-863aa0e76163
uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.2/prebuilt/receipt/analyzeResults/1ff5365d-b8b3-4448-af6d-93b5f1e9a8e4
response:
body:
string: '{"status": "succeeded", "createdDateTime": "2020-11-11T18:03:30Z",
"lastUpdatedDateTime": "2020-11-11T18:03:34Z", "analyzeResult": {"version":
"2.1.0", "readResults": [{"page": 1, "angle": 0.1273, "width": 1688, "height":
string: '{"status": "succeeded", "createdDateTime": "2020-11-16T19:08:58Z",
"lastUpdatedDateTime": "2020-11-16T19:09:02Z", "analyzeResult": {"version":
"2.1.0", "readResults": [{"page": 1, "angle": 0.6893, "width": 1688, "height":
3000, "unit": "pixel"}], "documentResults": [{"docType": "prebuilt:receipt",
"pageRange": [1, 1], "fields": {"ReceiptType": {"type": "string", "valueString":
"Itemized", "confidence": 0.99}, "MerchantName": {"type": "string", "valueString":
"Contoso Contoso", "text": "Contoso Contoso", "boundingBox": [380.9, 282.9,
1116, 473.2, 1025, 824.4, 290, 634], "page": 1, "confidence": 0.716}, "MerchantAddress":
{"type": "string", "valueString": "123 Main Street Redmond, WA 98052", "text":
"123 Main Street Redmond, WA 98052", "boundingBox": [298.3, 676.5, 844.6,
781.5, 810.7, 958, 264.4, 853], "page": 1, "confidence": 0.989}, "MerchantPhoneNumber":
{"type": "phoneNumber", "valuePhoneNumber": "+19876543210", "text": "987-654-3210",
"boundingBox": [271, 1000, 651, 1049, 643, 1125, 264, 1075], "page": 1, "confidence":
0.99}, "TransactionDate": {"type": "date", "valueDate": "2019-06-10", "text":
"6/10/2019", "boundingBox": [259, 1224, 510, 1246, 505, 1331, 255, 1312],
"page": 1, "confidence": 0.99}, "TransactionTime": {"type": "time", "valueTime":
"13:59:00", "text": "13:59", "boundingBox": [527, 1248, 681, 1262, 675, 1341,
522, 1332], "page": 1, "confidence": 0.989}, "Items": {"type": "array", "valueArray":
[{"type": "object", "valueObject": {"Quantity": {"type": "number", "valueNumber":
1, "text": "1", "boundingBox": [244, 1581, 288, 1584, 285, 1678, 241, 1675],
"page": 1, "confidence": 0.919}, "Name": {"type": "string", "valueString":
"Cappuccino", "text": "Cappuccino", "boundingBox": [306, 1585, 658, 1598,
657, 1688, 304, 1679], "page": 1, "confidence": 0.959}, "TotalPrice": {"type":
"number", "valueNumber": 2.2, "text": "$2.20", "boundingBox": [1106, 1579,
1260, 1574, 1263, 1656, 1108, 1662], "page": 1, "confidence": 0.959}}}, {"type":
"object", "valueObject": {"Quantity": {"type": "number", "valueNumber": 1,
"text": "1", "boundingBox": [227, 1839, 278, 1839, 277, 1924, 226, 1924],
"page": 1, "confidence": 0.91}, "Name": {"type": "string", "valueString":
"BACON & EGGS", "text": "BACON & EGGS", "boundingBox": [294, 1839, 737, 1839,
737, 1924, 294, 1924], "page": 1, "confidence": 0.955}, "TotalPrice": {"type":
"number", "valueNumber": 9.5, "text": "$9.5", "boundingBox": [1134, 1948,
1252, 1948, 1252, 2041, 1134, 2041], "page": 1, "confidence": 0.958}}}]},
"Subtotal": {"type": "number", "valueNumber": 11.7, "text": "11.70", "boundingBox":
[1139, 2228, 1309, 2228, 1308, 2313, 1138, 2313], "page": 1, "confidence":
0.923}, "Tax": {"type": "number", "valueNumber": 1.17, "text": "1.17", "boundingBox":
[1186, 2356, 1307, 2361, 1303, 2452, 1182, 2447], "page": 1, "confidence":
0.979}, "Tip": {"type": "number", "valueNumber": 463, "text": "$463", "boundingBox":
[1034, 2483, 1268, 2488, 1266, 2583, 1032, 2577], "page": 1, "confidence":
0.975}, "Total": {"type": "number", "valueNumber": 14.5, "text": "$14.50",
"boundingBox": [1033, 2623, 1376, 2641, 1370, 2758, 1027, 2740], "page": 1,
"confidence": 0.987}}}]}}'
"Itemized", "confidence": 0.692}, "MerchantName": {"type": "string", "valueString":
"Contoso Contoso", "text": "Contoso Contoso", "boundingBox": [378.2, 292.4,
1117.7, 468.3, 1035.7, 812.7, 296.3, 636.8], "page": 1, "confidence": 0.613},
"MerchantAddress": {"type": "string", "valueString": "123 Main Street Redmond,
WA 98052", "text": "123 Main Street Redmond, WA 98052", "boundingBox": [302,
675.8, 848.1, 793.7, 809.9, 970.4, 263.9, 852.5], "page": 1, "confidence":
0.99}, "MerchantPhoneNumber": {"type": "phoneNumber", "valuePhoneNumber":
"+19876543210", "text": "987-654-3210", "boundingBox": [278, 1004, 656, 1057,
647, 1123, 271, 1075], "page": 1, "confidence": 0.99}, "TransactionDate":
{"type": "date", "valueDate": "2019-06-10", "text": "6/10/2019", "boundingBox":
[267, 1229, 525, 1247, 517, 1332, 259, 1313], "page": 1, "confidence": 0.99},
"TransactionTime": {"type": "time", "valueTime": "13:59:00", "text": "13:59",
"boundingBox": [541, 1248, 677, 1263, 669, 1345, 533, 1333], "page": 1, "confidence":
0.977}, "Items": {"type": "array", "valueArray": [{"type": "object", "valueObject":
{"Quantity": {"type": "number", "valueNumber": 1, "text": "1", "boundingBox":
[245, 1583, 299, 1585, 295, 1676, 241, 1671], "page": 1, "confidence": 0.92},
"Name": {"type": "string", "valueString": "Cappuccino", "text": "Cappuccino",
"boundingBox": [322, 1586, 654, 1605, 648, 1689, 318, 1678], "page": 1, "confidence":
0.923}, "TotalPrice": {"type": "number", "valueNumber": 2.2, "text": "$2.20",
"boundingBox": [1108, 1584, 1263, 1574, 1268, 1656, 1113, 1666], "page": 1,
"confidence": 0.918}}}, {"type": "object", "valueObject": {"Quantity": {"type":
"number", "valueNumber": 1, "text": "1", "boundingBox": [232, 1834, 286, 1836,
285, 1920, 231, 1920], "page": 1, "confidence": 0.858}, "Name": {"type": "string",
"valueString": "BACON & EGGS", "text": "BACON & EGGS", "boundingBox": [308,
1836, 746, 1841.4, 745, 1925.4, 307, 1920], "page": 1, "confidence": 0.916},
"TotalPrice": {"type": "number", "valueNumber": 9.5, "text": "$9.5", "boundingBox":
[1135, 1955, 1257, 1952, 1259, 2036, 1136, 2039], "page": 1, "confidence":
0.916}}}]}, "Subtotal": {"type": "number", "valueNumber": 11.7, "text": "11.70",
"boundingBox": [1146, 2221, 1297, 2223, 1296, 2319, 1145, 2317], "page": 1,
"confidence": 0.955}, "Tax": {"type": "number", "valueNumber": 1.17, "text":
"1.17", "boundingBox": [1190, 2359, 1304, 2359, 1304, 2456, 1190, 2456], "page":
1, "confidence": 0.979}, "Tip": {"type": "number", "valueNumber": 1.63, "text":
"1.63", "boundingBox": [1094, 2479, 1267, 2485, 1264, 2591, 1091, 2585], "page":
1, "confidence": 0.941}, "Total": {"type": "number", "valueNumber": 14.5,
"text": "$14.50", "boundingBox": [1034, 2620, 1384, 2638, 1380, 2763, 1030,
2739], "page": 1, "confidence": 0.985}}}]}}'
headers:
apim-request-id:
- 6d4f38cc-a802-4e2f-8e13-b3bd85a0bd69
- c2856806-d705-4338-be31-aa24fa0c3489
content-length:
- '2820'
- '2835'
content-type:
- application/json; charset=utf-8
date:
- Wed, 11 Nov 2020 18:03:35 GMT
- Mon, 16 Nov 2020 19:09:03 GMT
strict-transport-security:
- max-age=31536000; includeSubDomains; preload
x-content-type-options:
- nosniff
x-envoy-upstream-service-time:
- '57'
- '95'
status:
code: 200
message: OK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,19 +472,19 @@ interactions:
string: ''
headers:
apim-request-id:
- 92427657-528f-468c-8503-24385ba4fb0a
- af108532-ae00-46c2-a8b5-b316dd512760
content-length:
- '0'
date:
- Wed, 11 Nov 2020 18:03:37 GMT
- Mon, 16 Nov 2020 19:09:04 GMT
operation-location:
- https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.2/prebuilt/receipt/analyzeResults/92427657-528f-468c-8503-24385ba4fb0a
- https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.2/prebuilt/receipt/analyzeResults/af108532-ae00-46c2-a8b5-b316dd512760
strict-transport-security:
- max-age=31536000; includeSubDomains; preload
x-content-type-options:
- nosniff
x-envoy-upstream-service-time:
- '203'
- '119'
status:
code: 202
message: Accepted
Expand All @@ -500,29 +500,29 @@ interactions:
User-Agent:
- azsdk-python-ai-formrecognizer/3.1.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0)
method: GET
uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.2/prebuilt/receipt/analyzeResults/92427657-528f-468c-8503-24385ba4fb0a
uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.2/prebuilt/receipt/analyzeResults/af108532-ae00-46c2-a8b5-b316dd512760
response:
body:
string: '{"status": "succeeded", "createdDateTime": "2020-11-11T18:03:37Z",
"lastUpdatedDateTime": "2020-11-11T18:03:39Z", "analyzeResult": {"version":
string: '{"status": "succeeded", "createdDateTime": "2020-11-16T19:09:04Z",
"lastUpdatedDateTime": "2020-11-16T19:09:08Z", "analyzeResult": {"version":
"2.1.0", "readResults": [{"page": 1, "angle": 0, "width": 8.5, "height": 11,
"unit": "inch"}], "documentResults": [{"docType": "prebuilt:receipt", "pageRange":
[1, 1], "fields": {}}]}}'
headers:
apim-request-id:
- 082e6567-eb58-4457-af91-24783fd1ff21
- 72063e63-d1b4-4f6b-8ac5-2f7ab23a4617
content-length:
- '300'
content-type:
- application/json; charset=utf-8
date:
- Wed, 11 Nov 2020 18:03:42 GMT
- Mon, 16 Nov 2020 19:09:09 GMT
strict-transport-security:
- max-age=31536000; includeSubDomains; preload
x-content-type-options:
- nosniff
x-envoy-upstream-service-time:
- '359'
- '16'
status:
code: 200
message: OK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,23 @@ interactions:
uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.2/prebuilt/receipt/analyze?includeTextDetails=false
response:
body:
string: '{"error": {"code": "BadArgument", "innerError": {"requestId": "bab9230b-4ff3-42aa-81c8-b00582452cb6"},
string: '{"error": {"code": "BadArgument", "innerError": {"requestId": "a533931f-55a1-4fd1-ad36-3c11ec5618a2"},
"message": "Bad or unrecognizable request JSON or binary file."}}'
headers:
apim-request-id:
- bab9230b-4ff3-42aa-81c8-b00582452cb6
- a533931f-55a1-4fd1-ad36-3c11ec5618a2
content-length:
- '161'
content-type:
- application/json; charset=utf-8
date:
- Wed, 11 Nov 2020 18:03:43 GMT
- Mon, 16 Nov 2020 19:09:09 GMT
strict-transport-security:
- max-age=31536000; includeSubDomains; preload
x-content-type-options:
- nosniff
x-envoy-upstream-service-time:
- '10'
- '5'
status:
code: 400
message: Bad Request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@ interactions:
uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.2/prebuilt/receipt/analyze?includeTextDetails=false
response:
body:
string: '{"error": {"code": "BadArgument", "innerError": {"requestId": "41b84122-4e73-4fdd-9c54-f7bff0ad6907"},
string: '{"error": {"code": "BadArgument", "innerError": {"requestId": "f82a52be-58f7-4e3c-a6db-02b08933fb78"},
"message": "Bad or unrecognizable request JSON or binary file."}}'
headers:
apim-request-id:
- 41b84122-4e73-4fdd-9c54-f7bff0ad6907
- f82a52be-58f7-4e3c-a6db-02b08933fb78
content-length:
- '161'
content-type:
- application/json; charset=utf-8
date:
- Wed, 11 Nov 2020 18:03:44 GMT
- Mon, 16 Nov 2020 19:09:11 GMT
strict-transport-security:
- max-age=31536000; includeSubDomains; preload
x-content-type-options:
- nosniff
x-envoy-upstream-service-time:
- '11'
- '5'
status:
code: 400
message: Bad Request
Expand Down
Loading