File tree Expand file tree Collapse file tree 3 files changed +3
-7
lines changed
Expand file tree Collapse file tree 3 files changed +3
-7
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 @@ -75,7 +75,7 @@ def query(
7575 self ,
7676 request : _RequestObjectProxy , # pylint: disable=unused-argument
7777 context : _Context ,
78- ) -> bytes :
78+ ) -> str :
7979 """
8080 Perform an image recognition query.
8181 """
@@ -86,8 +86,6 @@ def query(
8686 'query_id' : uuid .uuid4 ().hex ,
8787 }
8888
89- text = json_dump (body )
90- context .headers ['Content-Encoding' ] = 'gzip'
91- value = gzip .compress (text .encode ())
89+ value = json_dump (body )
9290 context .headers ['Content-Length' ] = str (len (value ))
9391 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