{"name": "test_invoice_batch_upload_change_status_from_acceptance_in_progress_to_canceled", "status": "failed", "statusDetails": {"message": "AssertionError: Handler: POST https://dm-ff-be-service-supply.k8s-review.dailymail-tech.uz/api/v1/invoice/cancel; \n Expected status code: 200; \n Actual status code: 500; \n Response body: {\"message\":\"\",\"localizedMessage\":\"Нельзя отменить инвойс 410000015901\"}; \n X-Aer-Trace-Id:", "trace": "self = <tests.fulfillment.test_supply.test_invoice.TestInvoiceBatch object at 0x750468c13210>\ncreate_sku_by_batch = FFBatchDTO(headers={'Authorization': 'Bearer d303217f-0d2f-4478-8ff0-658ff3bc3af7', 'x-aer-mesh': 'dm-hub-service-pack...tp://www.voentorg.biz/within/its.tiff', 'price': 4787, 'weight': 6501, 'length': 5051, 'width': 3010, 'height': 7892}])\n\n    def test_invoice_batch_upload_change_status_from_acceptance_in_progress_to_canceled(self, create_sku_by_batch):\n        headers = create_sku_by_batch.headers\n        list_sku_for_batch_file = [\n            InvoiceBatch(sku_id=sku.get(\"external_sku_id\"), barcode=sku.get(\"barcode\")).to_dict()\n            for sku in create_sku_by_batch.batch_data\n        ]\n        InvoiceBuilder(headers=headers).batch_upload(list_sku_for_batch_file)\n        external_sku_ids = [sku.get(\"external_sku_id\") for sku in create_sku_by_batch.batch_data]\n        check_created_invoice = FFSupplyQueries().get_invoice_status_by_external_sku_id(external_sku_ids[0])\n    \n        invoice_number = check_created_invoice.get(\"invoice_number\")\n    \n        InvoiceBuilder(headers=headers).update_invoice(invoice_number=invoice_number)\n        InvoiceBuilder(headers=headers).send_invoice(invoice_number=invoice_number)\n    \n        assert (\n>           InvoiceBuilder(headers=headers).cancel_invoice(invoice_number=invoice_number).get_status()\n            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n            == FFSupplyInvoiceStatuses.CANCELED.name\n        ), \"Invoice is not in the 'Cancelled' status\"\n\ntests/fulfillment/test_supply/test_invoice.py:223: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nsrc/framework/fulfillment/builders/supply/invoice.py:48: in cancel_invoice\n    InvoiceApi(headers=self.headers).api_v1_invoice_cancel_post(invoice_number=invoice_number)\n/usr/local/lib/python3.11/site-packages/qacl_dm_ff_be_service_supply/api/invoice_api.py:248: in api_v1_invoice_cancel_post\n    return self.api_v1_invoice_cancel_post_with_http_info(invoice_number, **kwargs)  # noqa: E501\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n/usr/local/lib/python3.11/site-packages/qacl_dm_ff_be_service_supply/api/invoice_api.py:311: in api_v1_invoice_cancel_post_with_http_info\n    return self.api_client.call_api(\n/usr/local/lib/python3.11/site-packages/qacl_dm_ff_be_service_supply/api_client.py:339: in call_api\n    return self.__call_api(resource_path, method,\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <qacl_dm_ff_be_service_supply.api_client.ApiClient object at 0x750466975790>\nresource_path = '/api/v1/invoice/cancel', method = 'POST', path_params = {}\nquery_params = [('invoiceNumber', 410000015901)]\nheader_params = {'Authorization': 'Bearer d303217f-0d2f-4478-8ff0-658ff3bc3af7', 'Content-Type': 'application/json', 'User-Agent': 'Swagger-Codegen/1.0.224+develop/python', 'x-aer-app-name': 'python-autotests', ...}\nbody = None, post_params = [], files = {}, response_type = None\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: POST https://dm-ff-be-service-supply.k8s-review.dailymail-tech.uz/api/v1/invoice/cancel; \nE            Expected status code: 200; \nE            Actual status code: 500; \nE            Response body: {\"message\":\"\",\"localizedMessage\":\"Нельзя отменить инвойс 410000015901\"}; \nE            X-Aer-Trace-Id:\n\n/usr/local/lib/python3.11/site-packages/qacl_dm_ff_be_service_supply/api_client.py:172: AssertionError"}, "steps": [{"name": "POST → https://dm-ff-be-service-supply.k8s-review.dailymail-tech.uz/api/v1/invoice/batch", "status": "passed", "steps": [{"name": "Request", "status": "passed", "attachments": [{"name": "request.headers", "source": "59621ff5-cd78-4659-99c3-414b1d774914-attachment.json", "type": "application/json"}], "start": 1775517845952, "stop": 1775517845952}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "3003d07c-be7e-48f1-a5a4-27d5552e4cc9-attachment.json", "type": "application/json"}], "start": 1775517845952, "stop": 1775517845952}], "attachments": [{"name": "cURL", "source": "5222370f-d2f2-4f02-af88-3769c1312502-attachment.txt", "type": "text/plain"}], "start": 1775517845952, "stop": 1775517845952}, {"name": "PUT → https://dm-ff-be-service-supply.k8s-review.dailymail-tech.uz/api/v1/invoice?invoiceNumber=410000015901", "status": "passed", "steps": [{"name": "Request", "status": "passed", "attachments": [{"name": "request.headers", "source": "9a8dfda7-e6b6-4546-aad6-8f0faa7fa2f2-attachment.json", "type": "application/json"}, {"name": "request.body", "source": "4e91c009-f31b-47b0-b65a-ac21f0c14580-attachment.json", "type": "application/json"}, {"name": "request.params", "source": "bd0187f6-7b15-4ad5-a24a-e56a4b9c6ba8-attachment.json", "type": "application/json"}], "start": 1775517846008, "stop": 1775517846009}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "f5d97282-8d71-4069-a611-c0caba73033d-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "94a4154f-2327-4a91-8516-f0b5b33f5a4e-attachment.json", "type": "application/json"}], "start": 1775517846009, "stop": 1775517846009}], "attachments": [{"name": "cURL", "source": "fe96aa6b-a82d-4286-b41f-2d5d8e543d24-attachment.txt", "type": "text/plain"}], "start": 1775517846008, "stop": 1775517846009}, {"name": "Waiter function: wait_send_invoice", "status": "passed", "steps": [{"name": "POST → https://dm-ff-be-service-supply.k8s-review.dailymail-tech.uz/api/v1/invoice/send?invoiceNumber=410000015901", "status": "passed", "steps": [{"name": "Request", "status": "passed", "attachments": [{"name": "request.headers", "source": "f1de5521-c065-4d61-9b1c-87cabfc838b1-attachment.json", "type": "application/json"}, {"name": "request.params", "source": "8c1e935e-29e0-48eb-9c4d-a7e5ee61ba32-attachment.json", "type": "application/json"}], "start": 1775517846075, "stop": 1775517846076}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "ada53413-f955-4c8a-91cc-3ca9e0bf3bd0-attachment.json", "type": "application/json"}], "start": 1775517846076, "stop": 1775517846076}], "attachments": [{"name": "cURL", "source": "ead1e91a-de91-42de-abeb-456ae34cfea6-attachment.txt", "type": "text/plain"}], "start": 1775517846075, "stop": 1775517846076}], "start": 1775517846011, "stop": 1775517846079}, {"name": "GET → https://dm-ff-be-service-supply.k8s-review.dailymail-tech.uz/api/v1/invoice", "status": "passed", "steps": [{"name": "Request", "status": "passed", "attachments": [{"name": "request.headers", "source": "f14bfa09-8213-4d00-a3f4-74a3319f534a-attachment.json", "type": "application/json"}, {"name": "request.params", "source": "952ee096-7c9f-4348-bc18-4aac0afa84f7-attachment.json", "type": "application/json"}], "start": 1775517846112, "stop": 1775517846112}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "ffe6aa0b-0668-4e98-9246-55d7a4d5c0f9-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "7b9d2a77-a8ed-4923-82cd-fbbbee751ccc-attachment.json", "type": "application/json"}], "start": 1775517846112, "stop": 1775517846112}], "attachments": [{"name": "cURL", "source": "f465d3ed-fc4d-4851-b6a4-9ef46c1e64f3-attachment.txt", "type": "text/plain"}], "start": 1775517846112, "stop": 1775517846112}, {"name": "POST → https://dm-ff-be-service-supply.k8s-review.dailymail-tech.uz/api/v1/invoice/cancel?invoiceNumber=410000015901", "status": "passed", "steps": [{"name": "Request", "status": "passed", "attachments": [{"name": "request.headers", "source": "60e95fe8-bb62-4198-9cc5-4a0d0eba91ed-attachment.json", "type": "application/json"}, {"name": "request.params", "source": "19aa6395-092e-4750-aa05-c0947a0db3e3-attachment.json", "type": "application/json"}], "start": 1775517846151, "stop": 1775517846151}, {"name": "Response → 500, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "222347d0-2c91-4212-ab69-2e7043b0d146-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "1567db1e-9d65-4b42-8ae3-644cd53a4bc6-attachment.json", "type": "application/json"}], "start": 1775517846151, "stop": 1775517846152}], "attachments": [{"name": "cURL", "source": "a83f55dc-ccac-48ac-b506-16ae343dd604-attachment.txt", "type": "text/plain"}], "start": 1775517846151, "stop": 1775517846152}], "attachments": [{"name": "log", "source": "057a2a03-78a6-4f95-9ed2-97a520fb65a6-attachment.txt", "type": "text/plain"}], "start": 1775517845273, "stop": 1775517846152, "uuid": "10bc626e-8001-4119-bea6-55016a04b08b", "historyId": "4f549164924e4674fc7ff401f357a937", "testCaseId": "4f549164924e4674fc7ff401f357a937", "fullName": "tests.fulfillment.test_supply.test_invoice.TestInvoiceBatch#test_invoice_batch_upload_change_status_from_acceptance_in_progress_to_canceled", "labels": [{"name": "tag", "value": "dm-ff-be-service-supply"}, {"name": "parentSuite", "value": "tests.fulfillment.test_supply"}, {"name": "suite", "value": "test_invoice"}, {"name": "subSuite", "value": "TestInvoiceBatch"}, {"name": "host", "value": "runner-1rdl4o-mi-project-9-concurrent-1-nf7l5zqw"}, {"name": "thread", "value": "24-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.fulfillment.test_supply.test_invoice"}], "titlePath": ["tests", "fulfillment", "test_supply", "test_invoice.py", "TestInvoiceBatch"]}