{"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 0x74a8826412d0>\nget_fmcg_auth_header = {'Authorization': 'Bearer ba237cf7-e0f8-45c6-b0ef-78492fe1f11d', '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 0x74a882667950>\nresource_path = '/api/v1/cart/add-item', method = 'PUT', path_params = {}\nquery_params = []\nheader_params = {'Accept': 'application/json', 'Authorization': 'Bearer ba237cf7-e0f8-45c6-b0ef-78492fe1f11d', 'Content-Type': 'application/json', 'User-Agent': 'Swagger-Codegen/1.0.59+release120/python', ...}\nbody = {'items': [{'barcode': '20946085616517', 'quantity': 1, 'skuId': '4100000000000016722'}, {'barcode': '28629798049313', 'quantity': 1, 'skuId': '4100000000000016722'}]}\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": "17082e35-7aad-493a-b176-b9024d2746ff-attachment.json", "type": "application/json"}], "start": 1775432353428, "stop": 1775432353428}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "3253a548-f377-4890-8c3a-783b36352ec4-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "8241d1c0-1253-4fc7-8729-90415bd1a8f6-attachment.json", "type": "application/json"}], "start": 1775432353428, "stop": 1775432353429}], "attachments": [{"name": "cURL", "source": "e6368614-b60c-4040-93e6-53203d2011c2-attachment.txt", "type": "text/plain"}], "start": 1775432353428, "stop": 1775432353429}, {"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": "704e9a83-5a3b-4331-8493-42b4b4b3400b-attachment.json", "type": "application/json"}], "start": 1775432353471, "stop": 1775432353472}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "a37af7dc-a784-4034-822d-fda70f69ca22-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "9e6e2c60-d8ef-4604-a6c7-7f3e66c48200-attachment.json", "type": "application/json"}], "start": 1775432353472, "stop": 1775432353472}], "attachments": [{"name": "cURL", "source": "1f3a40e7-a8a4-43a5-afda-9692f007b715-attachment.txt", "type": "text/plain"}], "start": 1775432353471, "stop": 1775432353472}, {"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": "3272caff-b820-4888-bb0c-8b60503faa06-attachment.json", "type": "application/json"}], "start": 1775432353513, "stop": 1775432353513}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "f7123c3c-bc93-4aa6-9298-a79a7e2f0ecc-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "aedd9b69-1f2e-44f9-8759-43ef652263e2-attachment.json", "type": "application/json"}], "start": 1775432353513, "stop": 1775432353514}], "attachments": [{"name": "cURL", "source": "776ea911-0256-492e-921b-dd8c57c7577c-attachment.txt", "type": "text/plain"}], "start": 1775432353513, "stop": 1775432353514}, {"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": "2cf93db8-a594-49da-937a-f705fda15499-attachment.json", "type": "application/json"}, {"name": "request.body", "source": "f7d765af-8d2c-4bf0-9a00-18bf55a458c4-attachment.json", "type": "application/json"}], "start": 1775432353593, "stop": 1775432353593}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "0e22f876-e615-442f-a26b-6d367c2a222f-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "93feb68f-3424-40f2-bb6a-6e3cc446106b-attachment.json", "type": "application/json"}], "start": 1775432353593, "stop": 1775432353593}], "attachments": [{"name": "cURL", "source": "34a4af66-ca5e-4dfd-a0c5-5d0883fd682f-attachment.txt", "type": "text/plain"}], "start": 1775432353593, "stop": 1775432353593}, {"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": "8d389eae-d0ee-4836-b598-d89d1e5a1d47-attachment.json", "type": "application/json"}, {"name": "request.body", "source": "78e852ab-57d9-47cc-adb6-5bae721c8d88-attachment.json", "type": "application/json"}], "start": 1775432353757, "stop": 1775432353757}, {"name": "Response → 500, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "776dff8c-f9ab-4f8d-89e1-a39a6b8e7a0d-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "48638e99-64c6-4f97-988f-034f01c40480-attachment.json", "type": "application/json"}], "start": 1775432353757, "stop": 1775432353757}], "attachments": [{"name": "cURL", "source": "a808eda8-d8a0-45ea-8bf1-3cc18ea116e3-attachment.txt", "type": "text/plain"}], "start": 1775432353757, "stop": 1775432353757}], "attachments": [{"name": "log", "source": "9b9c5848-fa78-40fa-bdb9-eda2329cdc2e-attachment.txt", "type": "text/plain"}], "start": 1775432353335, "stop": 1775432353758, "uuid": "83ce094c-82aa-471f-8b23-f17b601a2188", "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-jdfb6amg"}, {"name": "thread", "value": "24-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"]}