{"name": "test_change_status_from_created_to_canceled", "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_invoice.TestFulfillmentSupplyCancelStatuses object at 0x7382de761690>\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_change_status_from_created_to_canceled(self, get_fmcg_auth_header):\n        \"\"\"\n        Отмена инвойса в статусе 'СОЗДАНО'\n        Ожидаемый результат: инвойс отменен\n        \"\"\"\n>       invoice_number = FMCGInvoiceBuilder(headers=get_fmcg_auth_header).create_invoice().invoice_number\n                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\ntests/fmcg/test_lk/test_invoice.py:79: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nsrc/framework/fmcg/builders/lk/invoice.py:33: in create_invoice\n    cart_items = FMCGCartBuilder(headers=self.headers).fill_cart().current_cart\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 0x7382de787b90>\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': '57311952699470', 'quantity': 1, 'skuId': '4100000000000016718'}, {'barcode': '96496833922278', 'quantity': 1, 'skuId': '4100000000000016718'}]}\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        Ожидаемый результат: инвойс отменен\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": "4a2fcb39-e735-4bdb-95c5-be8cf3ee7c47-attachment.json", "type": "application/json"}], "start": 1775345989034, "stop": 1775345989034}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "64d240a2-8a14-4ceb-bf63-108c7ca1333d-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "5a9b67a0-1278-4dfc-aaab-29a4ed206ee8-attachment.json", "type": "application/json"}], "start": 1775345989034, "stop": 1775345989035}], "attachments": [{"name": "cURL", "source": "add7f3b3-ddba-4bca-93a4-2bb5214ef55c-attachment.txt", "type": "text/plain"}], "start": 1775345989034, "stop": 1775345989035}, {"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": "d160c865-5e91-4779-b0b9-050b62f01cf5-attachment.json", "type": "application/json"}], "start": 1775345989060, "stop": 1775345989060}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "9f84d997-b672-4db2-a810-f97ffd366d27-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "c0f4f5ef-3a1c-46d5-a9f0-1dfeee8ad206-attachment.json", "type": "application/json"}], "start": 1775345989060, "stop": 1775345989060}], "attachments": [{"name": "cURL", "source": "38bc5a68-d683-46be-873f-b16e92b782a0-attachment.txt", "type": "text/plain"}], "start": 1775345989059, "stop": 1775345989060}, {"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": "bb9c6060-db88-481b-9cd6-133fcb840a85-attachment.json", "type": "application/json"}], "start": 1775345989087, "stop": 1775345989087}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "66f0b0a7-282b-45f0-899a-7055add46452-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "5b74b77d-ae1c-40e2-8ba3-b0f618b6494b-attachment.json", "type": "application/json"}], "start": 1775345989087, "stop": 1775345989087}], "attachments": [{"name": "cURL", "source": "dc7c5f04-9ef2-4958-b0f8-4ca6252a7ef4-attachment.txt", "type": "text/plain"}], "start": 1775345989087, "stop": 1775345989087}, {"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": "aa8dc834-65e7-4148-9fa8-631bdc040740-attachment.json", "type": "application/json"}, {"name": "request.body", "source": "0d82032d-cbac-454f-b6c0-507b167120f1-attachment.json", "type": "application/json"}], "start": 1775345989121, "stop": 1775345989121}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "8c14a0b8-25fb-43b9-9651-b6e4b1292b31-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "c26e3789-2923-4c57-bade-13bc7ba7f1b1-attachment.json", "type": "application/json"}], "start": 1775345989121, "stop": 1775345989122}], "attachments": [{"name": "cURL", "source": "0808d66d-50d6-4e0e-bb31-9fc532800f39-attachment.txt", "type": "text/plain"}], "start": 1775345989121, "stop": 1775345989122}, {"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": "3a004218-90b0-4e6b-a549-c8d5b28561c3-attachment.json", "type": "application/json"}, {"name": "request.body", "source": "3ec61913-7a82-42e6-a4cf-dade7b6ea136-attachment.json", "type": "application/json"}], "start": 1775345989156, "stop": 1775345989156}, {"name": "Response → 500, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "c043be28-b8da-4510-ba1b-03eb3440760a-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "39d45fe0-c462-44b0-9b38-3edb4cab8a58-attachment.json", "type": "application/json"}], "start": 1775345989156, "stop": 1775345989156}], "attachments": [{"name": "cURL", "source": "91dcfd1a-508e-4a7f-b50d-a2d17bcb9521-attachment.txt", "type": "text/plain"}], "start": 1775345989156, "stop": 1775345989156}], "attachments": [{"name": "log", "source": "1362bade-4f30-418e-8458-4fd48f933bd0-attachment.txt", "type": "text/plain"}], "start": 1775345989012, "stop": 1775345989156, "uuid": "596a540d-df11-49ee-a2cb-6542aee11b49", "historyId": "de20d95a8c55e1a2f97ef4ed8420bfa8", "testCaseId": "de20d95a8c55e1a2f97ef4ed8420bfa8", "fullName": "tests.fmcg.test_lk.test_invoice.TestFulfillmentSupplyCancelStatuses#test_change_status_from_created_to_canceled", "labels": [{"name": "tag", "value": "dm-fmcg-be-service-lk"}, {"name": "parentSuite", "value": "tests.fmcg.test_lk"}, {"name": "suite", "value": "test_invoice"}, {"name": "subSuite", "value": "TestFulfillmentSupplyCancelStatuses"}, {"name": "host", "value": "runner-1rdl4o-mi-project-9-concurrent-3-pxnt4b3s"}, {"name": "thread", "value": "27-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.fmcg.test_lk.test_invoice"}], "titlePath": ["tests", "fmcg", "test_lk", "test_invoice.py", "TestFulfillmentSupplyCancelStatuses"]}