{"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: 3; nested exception is javax.persistence.NonUniqueResultException: query did not return a unique result: 3\",\"localizedMessage\":\"query did not return a unique result: 3; nested exception is javax.persistence.NonUniqueResultException: query did not return a unique result: 3\"}; \n X-Aer-Trace-Id:", "trace": "self = <tests.fmcg.test_lk.test_cart.TestCart object at 0x70090ffa1d50>\nget_fmcg_auth_header = {'Authorization': 'Bearer 60b4e4d7-f3a9-4853-b1b1-282f1129d8b5', 'x-aer-mesh': 'dm-hub-service-package:master;dm-hub-s...hub-internal:master;dm-hub-workflow-integration:master;dm-hub-workflow-package:master;dm-hub-workflow-tracking:master'}\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 0x70090f55f010>\nresource_path = '/api/v1/cart/add-item', method = 'PUT', path_params = {}\nquery_params = []\nheader_params = {'Accept': 'application/json', 'Authorization': 'Bearer 60b4e4d7-f3a9-4853-b1b1-282f1129d8b5', 'Content-Type': 'application/json', 'User-Agent': 'Swagger-Codegen/1.0.59+release120/python', ...}\nbody = {'items': [{'barcode': '52529361538526', 'quantity': 8, 'skuId': '4100000000000016724'}]}\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: 3; nested exception is javax.persistence.NonUniqueResultException: query did not return a unique result: 3\",\"localizedMessage\":\"query did not return a unique result: 3; nested exception is javax.persistence.NonUniqueResultException: query did not return a unique result: 3\"}; \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": "db4f17c1-cc8b-4310-b5dd-2a4c5af03a9e-attachment.json", "type": "application/json"}], "start": 1775432353428, "stop": 1775432353428}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "a5755c12-0e6f-4c59-b72e-926b5bef82ac-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "cf5e4cca-560a-4d32-a3aa-3513939cec84-attachment.json", "type": "application/json"}], "start": 1775432353428, "stop": 1775432353428}], "attachments": [{"name": "cURL", "source": "b7049cce-a475-4fa6-b159-b14923d88268-attachment.txt", "type": "text/plain"}], "start": 1775432353428, "stop": 1775432353428}, {"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": "fba03887-f443-4ed1-b155-58574c17250b-attachment.json", "type": "application/json"}], "start": 1775432353511, "stop": 1775432353511}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "e1eff248-a768-4524-86b9-9e5d5a1d2d81-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "bd92fb99-0724-4ca1-b958-b68a490552d7-attachment.json", "type": "application/json"}], "start": 1775432353512, "stop": 1775432353512}], "attachments": [{"name": "cURL", "source": "2fa4500c-5ae1-4e30-a703-0d4d05deddf4-attachment.txt", "type": "text/plain"}], "start": 1775432353511, "stop": 1775432353512}, {"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": "22e5e95c-2d3f-4ca8-8cdd-53d64df67a39-attachment.json", "type": "application/json"}], "start": 1775432353568, "stop": 1775432353568}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "ea93eb77-b7a6-4407-8945-1a156106c877-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "c9611186-55b1-4bea-9c69-30ed3cd95021-attachment.json", "type": "application/json"}], "start": 1775432353568, "stop": 1775432353569}], "attachments": [{"name": "cURL", "source": "626354e1-8a62-406f-a1b1-3a8ed2fabc6f-attachment.txt", "type": "text/plain"}], "start": 1775432353568, "stop": 1775432353569}, {"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": "4bd09819-aff9-466c-a2ee-c63341c25f12-attachment.json", "type": "application/json"}, {"name": "request.body", "source": "a8fafabc-fb5c-4a44-ab67-c2ad38ed7bb2-attachment.json", "type": "application/json"}], "start": 1775432353658, "stop": 1775432353658}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "9554985c-4703-41d3-9073-ac19e96c9321-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "458aebc8-6419-4586-87e5-8fde8e7b4600-attachment.json", "type": "application/json"}], "start": 1775432353658, "stop": 1775432353658}], "attachments": [{"name": "cURL", "source": "6a2a4f79-86b9-4f95-9782-1eeb200bdf03-attachment.txt", "type": "text/plain"}], "start": 1775432353658, "stop": 1775432353658}, {"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": "35c050de-97c3-4a06-a2a9-9f47b7f15301-attachment.json", "type": "application/json"}, {"name": "request.body", "source": "40fbf5b4-3520-4f01-b711-624f3187df39-attachment.json", "type": "application/json"}], "start": 1775432353768, "stop": 1775432353768}, {"name": "Response → 500, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "02ffe040-2732-4b29-8292-17e788df82f5-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "198ba4b4-c49b-47b9-890c-2983602488f5-attachment.json", "type": "application/json"}], "start": 1775432353768, "stop": 1775432353768}], "attachments": [{"name": "cURL", "source": "7ff77e42-5ab3-45cb-8f1f-b21bc80e8a1f-attachment.txt", "type": "text/plain"}], "start": 1775432353768, "stop": 1775432353768}], "attachments": [{"name": "log", "source": "2d430e61-7d58-4c68-8cf5-57c5afae6ddf-attachment.txt", "type": "text/plain"}], "start": 1775432353372, "stop": 1775432353769, "uuid": "9587ab66-1599-4239-bd93-2b56a2953465", "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-3-jdfb6amg"}, {"name": "thread", "value": "30-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"]}