{"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: 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_invoice.TestFulfillmentSupplyCancelStatuses object at 0x79792c2e8b90>\nget_fmcg_auth_header = {'Authorization': 'Bearer e980cabe-d4a9-437f-8b57-8b86af9ec3ee', '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 0x79792c101090>\nresource_path = '/api/v1/cart/add-item', method = 'PUT', path_params = {}\nquery_params = []\nheader_params = {'Accept': 'application/json', 'Authorization': 'Bearer e980cabe-d4a9-437f-8b57-8b86af9ec3ee', 'Content-Type': 'application/json', 'User-Agent': 'Swagger-Codegen/1.0.63+develop/python', ...}\nbody = {'items': [{'barcode': '71751912534241', 'quantity': 1, 'skuId': '4100000000000016772'}, {'barcode': '61859861740420', 'quantity': 1, 'skuId': '4100000000000016772'}]}\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        Ожидаемый результат: инвойс отменен\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": "c89e37f7-3687-4034-b6bd-84b66dedfdb7-attachment.json", "type": "application/json"}], "start": 1775518757775, "stop": 1775518757776}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "a7153cbb-2c8a-4a67-bf9f-dc2fbef873ba-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "d7145536-2f90-4704-b929-e89876341264-attachment.json", "type": "application/json"}], "start": 1775518757776, "stop": 1775518757776}], "attachments": [{"name": "cURL", "source": "b2257cd0-8321-4b56-a907-8d031f4d1a96-attachment.txt", "type": "text/plain"}], "start": 1775518757775, "stop": 1775518757776}, {"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": "ea4ee196-585a-4fae-b7c3-9385e6e4f85a-attachment.json", "type": "application/json"}], "start": 1775518757864, "stop": 1775518757864}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "d838ce3b-6414-4e30-9b64-c031efe0a2ad-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "897773e8-51ee-4535-827f-07709d453e4a-attachment.json", "type": "application/json"}], "start": 1775518757864, "stop": 1775518757864}], "attachments": [{"name": "cURL", "source": "ecaedfb8-e597-419c-b5d6-ebfbd12292d0-attachment.txt", "type": "text/plain"}], "start": 1775518757864, "stop": 1775518757864}, {"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": "23de61a3-e558-47fb-9cc0-f39fd70001e5-attachment.json", "type": "application/json"}], "start": 1775518757894, "stop": 1775518757894}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "76d26dc2-cffa-45a4-93b6-04c320fe0548-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "ec20afe6-4923-4aee-8bfc-a9ab7c1fa0c7-attachment.json", "type": "application/json"}], "start": 1775518757894, "stop": 1775518757895}], "attachments": [{"name": "cURL", "source": "3489bc5f-f014-4d4f-a218-a8a5cc63d725-attachment.txt", "type": "text/plain"}], "start": 1775518757894, "stop": 1775518757895}, {"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": "e51c78aa-2c04-496f-abdc-1c61a9a82b69-attachment.json", "type": "application/json"}, {"name": "request.body", "source": "cf4c020a-ccd2-4469-a894-f645512a8aea-attachment.json", "type": "application/json"}], "start": 1775518757968, "stop": 1775518757968}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "b6b39010-a31c-4925-b946-ff7d74d44a45-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "28b693a4-b5e0-44bc-bf86-35a0a5419fb6-attachment.json", "type": "application/json"}], "start": 1775518757968, "stop": 1775518757968}], "attachments": [{"name": "cURL", "source": "c170a5fd-be56-4391-8198-a377c903a5a0-attachment.txt", "type": "text/plain"}], "start": 1775518757968, "stop": 1775518757968}, {"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": "1752aba5-1b2b-414b-a8af-4c3fe0cf9b8d-attachment.json", "type": "application/json"}, {"name": "request.body", "source": "2992335d-9bd7-4869-8a57-3beea131c314-attachment.json", "type": "application/json"}], "start": 1775518758159, "stop": 1775518758159}, {"name": "Response → 500, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "1b09d16b-ef26-456b-b944-cf9e0216a17c-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "a42e77c9-addd-47e8-8951-acb2e621c0ef-attachment.json", "type": "application/json"}], "start": 1775518758159, "stop": 1775518758159}], "attachments": [{"name": "cURL", "source": "9f85dca6-1d5f-488f-a58d-42e595e54771-attachment.txt", "type": "text/plain"}], "start": 1775518758159, "stop": 1775518758160}], "attachments": [{"name": "log", "source": "4362ec4c-a6e4-4528-b973-6e434e1e1268-attachment.txt", "type": "text/plain"}], "start": 1775518757675, "stop": 1775518758160, "uuid": "61166e04-fff5-47dd-85cc-115166e71f1a", "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-u18kj11c"}, {"name": "thread", "value": "39-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"]}