Skip to content

Commit 99799d5

Browse files
[formrecognizer] test parity with other languages (#12059)
* add encoding check test * add copy test bad model id * test big endian tiff * add missing blank page test for custom forms * update tests to use GlobalClientPreparer
1 parent 83bf9a5 commit 99799d5

27 files changed

+4615
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
interactions:
2+
- request:
3+
body: 'b''{"source": "https://fakeuri.com/blank%20space"}'''
4+
headers:
5+
Accept:
6+
- '*/*'
7+
Accept-Encoding:
8+
- gzip, deflate
9+
Connection:
10+
- keep-alive
11+
Content-Length:
12+
- '47'
13+
Content-Type:
14+
- application/json
15+
User-Agent:
16+
- azsdk-python-ai-formrecognizer/1.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0)
17+
Python/3.7.3 (Windows-10-10.0.18362-SP0)
18+
method: POST
19+
uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0-preview/layout/analyze
20+
response:
21+
body:
22+
string: '{"error": {"code": "FailedToDownloadImage", "message": "Failed to download
23+
image from input URL."}}'
24+
headers:
25+
apim-request-id:
26+
- 0801fae5-b315-4d33-9df7-c6fb8333d4db
27+
content-type:
28+
- application/json; charset=utf-8
29+
date:
30+
- Mon, 15 Jun 2020 18:08:28 GMT
31+
strict-transport-security:
32+
- max-age=31536000; includeSubDomains; preload
33+
transfer-encoding:
34+
- chunked
35+
x-content-type-options:
36+
- nosniff
37+
x-envoy-upstream-service-time:
38+
- '2496'
39+
status:
40+
code: 400
41+
message: Bad Request
42+
version: 1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
interactions:
2+
- request:
3+
body: 'b''{"source": "https://fakeuri.com/blank%20space"}'''
4+
headers:
5+
Content-Length:
6+
- '47'
7+
Content-Type:
8+
- application/json
9+
User-Agent:
10+
- azsdk-python-ai-formrecognizer/1.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0)
11+
Python/3.7.3 (Windows-10-10.0.18362-SP0)
12+
method: POST
13+
uri: https://centraluseuap.api.cognitive.microsoft.com/formrecognizer/v2.0-preview/layout/analyze
14+
response:
15+
body:
16+
string: '{"error": {"code": "FailedToDownloadImage", "message": "Failed to download
17+
image from input URL."}}'
18+
headers:
19+
apim-request-id: ba66c94f-af17-4785-a6d6-7c04ca117d87
20+
content-type: application/json; charset=utf-8
21+
date: Mon, 15 Jun 2020 18:18:10 GMT
22+
strict-transport-security: max-age=31536000; includeSubDomains; preload
23+
transfer-encoding: chunked
24+
x-content-type-options: nosniff
25+
x-envoy-upstream-service-time: '490'
26+
status:
27+
code: 400
28+
message: Bad Request
29+
url: https://centraluseuap.api.cognitive.microsoft.com//formrecognizer/v2.0-preview/layout/analyze
30+
version: 1

0 commit comments

Comments
 (0)