{"name": "test_add_items_to_cart", "status": "failed", "statusDetails": {"message": "AssertionError: Handler: PUT https://dm-fmcg-be-service-lk.k8s-review.dailymail-tech.uz/api/v1/cart/add-item; \n Expected status code: 200; \n Actual status code: 500; \n Response body: {\"message\":\"query did not return a unique result: 2; nested exception is javax.persistence.NonUniqueResultException: query did not return a unique result: 2\",\"localizedMessage\":\"query did not return a unique result: 2; nested exception is javax.persistence.NonUniqueResultException: query did not return a unique result: 2\"}; \n X-Aer-Trace-Id:", "trace": "self = <tests.fmcg.test_lk.test_cart.TestCart object at 0x7654ecabc510>\nget_fmcg_auth_header = {'Authorization': 'Bearer 1a592f92-8a0d-4b0c-be7c-f20c37a07090'}\n\n    def test_add_items_to_cart(self, get_fmcg_auth_header):\n        \"\"\"\n        Добавляем товары в корзину\n        \"\"\"\n        sku_data = FMCGSKUBuilder(headers=get_fmcg_auth_header).create_sku().current_sku\n        cart_items = [\n            UpdateCartItemDto(sku_id=i.sku_id, barcode=i.barcode, quantity=fake.random_digit_not_null())\n            for i in sku_data.barcode_infos\n        ]\n>       assert FMCGCartBuilder(headers=get_fmcg_auth_header).fill_cart(\n            body=CartDto(items=cart_items)\n        ), \"SKU don't add to cart\"\n\ntests/fmcg/test_lk/test_cart.py:28: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nsrc/framework/fmcg/builders/lk/cart.py:24: in fill_cart\n    CartApi(headers=self.headers).api_v1_cart_add_item_put(body=request_body, **invoice_data).data.items\n    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n/usr/local/lib/python3.11/site-packages/qacl_dm_fmcg_be_service_lk/api/cart_api.py:55: in api_v1_cart_add_item_put\n    return self.api_v1_cart_add_item_put_with_http_info(body, **kwargs)  # noqa: E501\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n/usr/local/lib/python3.11/site-packages/qacl_dm_fmcg_be_service_lk/api/cart_api.py:129: in api_v1_cart_add_item_put_with_http_info\n    return self.api_client.call_api(\n/usr/local/lib/python3.11/site-packages/qacl_dm_fmcg_be_service_lk/api_client.py:339: in call_api\n    return self.__call_api(resource_path, method,\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <qacl_dm_fmcg_be_service_lk.api_client.ApiClient object at 0x7654eb94d0d0>\nresource_path = '/api/v1/cart/add-item', method = 'PUT', path_params = {}\nquery_params = []\nheader_params = {'Accept': 'application/json', 'Authorization': 'Bearer 1a592f92-8a0d-4b0c-be7c-f20c37a07090', 'Content-Type': 'application/json', 'User-Agent': 'Swagger-Codegen/1.0.63+develop/python', ...}\nbody = {'items': [{'barcode': '76150560318240', 'quantity': 1, 'skuId': '4100000000000016743'}]}\npost_params = [], files = {}, response_type = 'CartDto'\nauth_settings = ['wms-authorization'], _return_http_data_only = False\ncollection_formats = {}, _preload_content = True, _request_timeout = None\nexpected_status_code = <HTTPStatus.OK: 200>\n\n    def __call_api(\n            self, resource_path, method, path_params=None,\n            query_params=None, header_params=None, body=None, post_params=None,\n            files=None, response_type=None, auth_settings=None,\n            _return_http_data_only=None, collection_formats=None,\n            _preload_content=True, _request_timeout=None,\n            expected_status_code=HTTPStatus.OK):\n    \n        config = self.configuration\n    \n        # header parameters\n        header_params = header_params or {}\n        header_params.update(self.default_headers)\n        if self.cookie:\n            header_params['Cookie'] = self.cookie\n        if header_params:\n            header_params = self.sanitize_for_serialization(header_params)\n            header_params = dict(self.parameters_to_tuples(header_params,\n                                                           collection_formats))\n    \n        # path parameters\n        if path_params:\n            path_params = self.sanitize_for_serialization(path_params)\n            path_params = self.parameters_to_tuples(path_params,\n                                                    collection_formats)\n            for k, v in path_params:\n                # specified safe chars, encode everything\n                resource_path = resource_path.replace(\n                    '{%s}' % k,\n                    quote(str(v), safe=config.safe_chars_for_path_param)\n                )\n    \n        # query parameters\n        if query_params:\n            query_params = self.sanitize_for_serialization(query_params)\n            query_params = self.parameters_to_tuples(query_params,\n                                                     collection_formats)\n    \n        # post parameters\n        if post_params or files:\n            post_params = self.prepare_post_parameters(post_params, files)\n            post_params = self.sanitize_for_serialization(post_params)\n            post_params = self.parameters_to_tuples(post_params,\n                                                    collection_formats)\n    \n        # auth setting\n        self.update_params_for_auth(header_params, query_params, auth_settings)\n    \n        # body\n        if body:\n            body = self.sanitize_for_serialization(body)\n    \n        # request url\n        url = self.configuration.host + resource_path\n    \n        # perform request and return response\n        response_data = self.request(\n            method, url, query_params=query_params, headers=header_params,\n            post_params=post_params, body=body,\n            _preload_content=_preload_content,\n            _request_timeout=_request_timeout)\n    \n        self.last_response = response_data\n    \n        return_data = response_data\n    \n        try:\n            response_data.data\n            trace_id = response_data.urllib3_response.headers.get('x-aer-trace-id', \"\")\n        except:\n            assert response_data.status == expected_status_code, \\\n                f'Handler: {method} {url}; \\n ' \\\n                f'Expected status code: {expected_status_code}; \\n ' \\\n                f'Actual status code: {response_data.status}'\n        else:\n>           assert response_data.status == expected_status_code, \\\n                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n                f'Handler: {method} {url}; \\n ' \\\n                f'Expected status code: {expected_status_code}; \\n ' \\\n                f'Actual status code: {response_data.status}; \\n ' \\\n                f'Response body: {response_data.data}; \\n ' \\\n                f'X-Aer-Trace-Id: {trace_id}'\nE           AssertionError: Handler: PUT https://dm-fmcg-be-service-lk.k8s-review.dailymail-tech.uz/api/v1/cart/add-item; \nE            Expected status code: 200; \nE            Actual status code: 500; \nE            Response body: {\"message\":\"query did not return a unique result: 2; nested exception is javax.persistence.NonUniqueResultException: query did not return a unique result: 2\",\"localizedMessage\":\"query did not return a unique result: 2; nested exception is javax.persistence.NonUniqueResultException: query did not return a unique result: 2\"}; \nE            X-Aer-Trace-Id:\n\n/usr/local/lib/python3.11/site-packages/qacl_dm_fmcg_be_service_lk/api_client.py:172: AssertionError"}, "description": "\n        Добавляем товары в корзину\n        ", "steps": [{"name": "GET → https://dm-fmcg-be-service-lk.k8s-review.dailymail-tech.uz/api/v1/categories", "status": "passed", "steps": [{"name": "Request", "status": "passed", "attachments": [{"name": "request.headers", "source": "ceb1ea67-cf62-43f4-9e3e-28811b325a59-attachment.json", "type": "application/json"}], "start": 1775502114385, "stop": 1775502114386}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "1d00e1c7-06e3-4287-a238-78221c2ebd9f-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "d905c3ea-455c-4166-9621-ce32fd63ce55-attachment.json", "type": "application/json"}], "start": 1775502114386, "stop": 1775502114386}], "attachments": [{"name": "cURL", "source": "7c27d76f-c155-4ad5-b98f-b8677da729ad-attachment.txt", "type": "text/plain"}], "start": 1775502114385, "stop": 1775502114386}, {"name": "GET → https://dm-fmcg-be-service-lk.k8s-review.dailymail-tech.uz/api/v1/unit", "status": "passed", "steps": [{"name": "Request", "status": "passed", "attachments": [{"name": "request.headers", "source": "22a4c6c9-43dd-4e44-b185-2d5a42f80cfe-attachment.json", "type": "application/json"}], "start": 1775502114410, "stop": 1775502114410}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "83e8d3c3-1c26-4f90-ac1b-26ac5a9c9e06-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "b3cc9dc1-74ac-4900-a40e-313b03061fcc-attachment.json", "type": "application/json"}], "start": 1775502114410, "stop": 1775502114410}], "attachments": [{"name": "cURL", "source": "c46d1b13-7278-4749-bdb7-e3210b77d750-attachment.txt", "type": "text/plain"}], "start": 1775502114410, "stop": 1775502114410}, {"name": "GET → https://dm-fmcg-be-service-lk.k8s-review.dailymail-tech.uz/api/v1/packingtype", "status": "passed", "steps": [{"name": "Request", "status": "passed", "attachments": [{"name": "request.headers", "source": "cdcb6867-119a-4c94-bb38-51f054a18940-attachment.json", "type": "application/json"}], "start": 1775502114434, "stop": 1775502114434}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "de42c8cd-edec-49ec-ba14-60e261ead9bd-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "7f2e7427-a524-41d3-a1cd-e9481b7234f0-attachment.json", "type": "application/json"}], "start": 1775502114434, "stop": 1775502114435}], "attachments": [{"name": "cURL", "source": "41510b4e-a31f-4430-9c7a-db7512a68377-attachment.txt", "type": "text/plain"}], "start": 1775502114434, "stop": 1775502114435}, {"name": "POST → https://dm-fmcg-be-service-lk.k8s-review.dailymail-tech.uz/api/v1/sku", "status": "passed", "steps": [{"name": "Request", "status": "passed", "attachments": [{"name": "request.headers", "source": "867f8007-573f-4345-90c7-e6d5c2487e96-attachment.json", "type": "application/json"}, {"name": "request.body", "source": "a7492f6d-c145-4ec7-8dee-9381eb86441b-attachment.json", "type": "application/json"}], "start": 1775502114484, "stop": 1775502114484}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "06a5d1cc-28dc-41ba-b135-c90f2a186d4d-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "da4f8ca6-2a6c-4322-96e4-34c7ad79f4e2-attachment.json", "type": "application/json"}], "start": 1775502114484, "stop": 1775502114484}], "attachments": [{"name": "cURL", "source": "e8312109-e8bb-420d-a174-aa5d9cb1aadb-attachment.txt", "type": "text/plain"}], "start": 1775502114484, "stop": 1775502114484}, {"name": "PUT → https://dm-fmcg-be-service-lk.k8s-review.dailymail-tech.uz/api/v1/cart/add-item", "status": "passed", "steps": [{"name": "Request", "status": "passed", "attachments": [{"name": "request.headers", "source": "0084aa6b-d8b8-41c8-9b59-8378582b0d8c-attachment.json", "type": "application/json"}, {"name": "request.body", "source": "fe48c5a5-36b8-430c-864d-c6d5b03d396e-attachment.json", "type": "application/json"}], "start": 1775502114632, "stop": 1775502114632}, {"name": "Response → 500, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "c17f45a4-2748-47ea-ae0c-fc7594009812-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "d0c8f704-2564-4c2f-8667-1abc0f541265-attachment.json", "type": "application/json"}], "start": 1775502114632, "stop": 1775502114632}], "attachments": [{"name": "cURL", "source": "2009661a-5d4d-41b7-95e9-891129f80829-attachment.txt", "type": "text/plain"}], "start": 1775502114632, "stop": 1775502114632}], "attachments": [{"name": "log", "source": "b9e1143f-a08f-4e6d-8f9a-e8951d23d63b-attachment.txt", "type": "text/plain"}], "start": 1775502114303, "stop": 1775502114633, "uuid": "8feff9aa-61e5-4c0f-9c44-9220bc028757", "historyId": "0d00cf4fb733f341b066a8d7512e759f", "testCaseId": "0d00cf4fb733f341b066a8d7512e759f", "fullName": "tests.fmcg.test_lk.test_cart.TestCart#test_add_items_to_cart", "labels": [{"name": "tag", "value": "dm-fmcg-be-service-lk"}, {"name": "parentSuite", "value": "tests.fmcg.test_lk"}, {"name": "suite", "value": "test_cart"}, {"name": "subSuite", "value": "TestCart"}, {"name": "host", "value": "runner-1rdl4o-mi-project-9-concurrent-0-pibpolkm"}, {"name": "thread", "value": "24-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.fmcg.test_lk.test_cart"}], "titlePath": ["tests", "fmcg", "test_lk", "test_cart.py", "TestCart"]}