File tree Expand file tree Collapse file tree 3 files changed +3
-8
lines changed
Expand file tree Collapse file tree 3 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ def __enter__(self) -> 'MockVWS':
127127 mock .register_uri (
128128 method = http_method ,
129129 url = re .compile (url_pattern ),
130- content = getattr (mock_vwq_api , route .route_name ),
130+ text = getattr (mock_vwq_api , route .route_name ),
131131 headers = headers ,
132132 )
133133
Original file line number Diff line number Diff line change 55https://library.vuforia.com/articles/Solution/How-To-Perform-an-Image-Recognition-Query
66"""
77
8- import gzip
98import uuid
109from typing import Callable , List , Set
1110
@@ -75,7 +74,7 @@ def query(
7574 self ,
7675 request : _RequestObjectProxy , # pylint: disable=unused-argument
7776 context : _Context ,
78- ) -> bytes :
77+ ) -> str :
7978 """
8079 Perform an image recognition query.
8180 """
@@ -86,8 +85,6 @@ def query(
8685 'query_id' : uuid .uuid4 ().hex ,
8786 }
8887
89- text = json_dump (body )
90- context .headers ['Content-Encoding' ] = 'gzip'
91- value = gzip .compress (text .encode ())
88+ value = json_dump (body )
9289 context .headers ['Content-Length' ] = str (len (value ))
9390 return value
Original file line number Diff line number Diff line change @@ -41,7 +41,6 @@ def assert_success(response: Response) -> None:
4141 assert response .json ()['result_code' ] == 'Success'
4242 response_header_keys = {
4343 'Connection' ,
44- 'Content-Encoding' ,
4544 'Content-Type' ,
4645 'Date' ,
4746 'Server' ,
@@ -65,7 +64,6 @@ def assert_success(response: Response) -> None:
6564 assert response .headers .keys () == response_header_keys
6665
6766 assert response .headers ['Connection' ] == 'keep-alive'
68- assert response .headers ['Content-Encoding' ] == 'gzip'
6967 assert response .headers ['Content-Type' ] == 'application/json'
7068 assert_valid_date_header (response = response )
7169 assert response .headers ['Server' ] == 'nginx'
You can’t perform that action at this time.
0 commit comments