@@ -0,0 +1,2170 @@
+%22%22%22%0ATests for the mock of the query endpoint.%0A%0Ahttps://library.vuforia.com/articles/Solution/How-To-Perform-an-Image-Recognition-Query.%0A%22%22%22%0A%0Aimport io%0Afrom typing import Any, Dict%0Afrom urllib.parse import urljoin%0A%0Aimport pytest%0Aimport requests%0Afrom requests import codes%0Afrom requests_mock import POST%0A%0Afrom tests.utils import VuforiaDatabaseKeys%0Afrom vws._request_utils import authorization_header, rfc_1123_date%0A%0A%0A@pytest.mark.usefixtures('verify_mock_vuforia')%0Aclass TestQuery:%0A    %22%22%22%0A    Tests for the query endpoint.%0A    %22%22%22%0A%0A    def test_no_results(%0A        self,%0A        vuforia_database_keys: VuforiaDatabaseKeys,%0A        high_quality_image: io.BytesIO,%0A    ) -%3E None:%0A        %22%22%22%0A        With no results%0A        %22%22%22%0A        image_content = high_quality_image.read()%0A        content_type = 'multipart/form-data'%0A        query: Dict%5Bstr, Any%5D = %7B%7D%0A        date = rfc_1123_date()%0A        request_path = '/v1/query'%0A        url = urljoin('https://cloudreco.vuforia.com', request_path)%0A        files = %7B'image': ('image.jpeg', image_content, 'image/jpeg')%7D%0A%0A        request = requests.Request(%0A            method=POST,%0A            url=url,%0A            headers=%7B%7D,%0A            data=query,%0A            files=files,%0A        )%0A%0A        prepared_request = request.prepare()  # type: ignore%0A%0A        authorization_string = authorization_header(%0A            access_key=vuforia_database_keys.client_access_key,%0A            secret_key=vuforia_database_keys.client_secret_key,%0A            method=POST,%0A            content=prepared_request.body,%0A            content_type=content_type,%0A            date=date,%0A            request_path=request_path,%0A        )%0A%0A        headers = %7B%0A            **prepared_request.headers,%0A            'Authorization': authorization_string,%0A            'Date': date,%0A        %7D%0A%0A        prepared_request.prepare_headers(headers=headers)%0A%0A        session = requests.Session()%0A        response = session.send(request=prepared_request)  # type: ignore%0A        assert response.status_code == codes.OK%0A        assert response.json()%5B'result_code'%5D == 'Success'%0A        assert response.json()%5B'results'%5D == %5B%5D%0A        assert 'query_id' in response.json()%0A

Revert "Remove test file"