{"name": "test_invoice_batch_upload_set_invoice_status_acceptance_in_progress", "status": "failed", "statusDetails": {"message": "AssertionError: Data in LK and in acceptance are not the same\n  LK:[('4100000000000016983', 2, '30931314303'), ('4100000000000016984', 4, '73784294960'), ('4100000000000016982', 7, '884397838621850')]\n  Acceptance:[('4100000000000016983', 2, ''), ('4100000000000016984', 4, ''), ('4100000000000016982', 7, '')]\nassert {'values_chan...7838621850'}}} == {}\n  \n  Left contains 1 more item:\n  {'values_changed': {'root[0][2]': {'new_value': '', 'old_value': '30931314303'},\n                      'root[1][2]': {'new_value': '', 'old_value': '73784294960'},\n                      'root[2][2]': {'new_value': '',\n                                     'old_value': '884397838621850'}}}\n  \n  Full diff:\n  - {}\n  + {\n  +     'values_changed': {\n  +         'root[0][2]': {\n  +             'new_value': '',\n  +             'old_value': '30931314303',\n  +         },\n  +         'root[1][2]': {\n  +             'new_value': '',\n  +             'old_value': '73784294960',\n  +         },\n  +         'root[2][2]': {\n  +             'new_value': '',\n  +             'old_value': '884397838621850',\n  +         },\n  +     },\n  + }", "trace": "self = <tests.fmcg.test_lk.test_integration.TestIntegrationWithAcceptanceService object at 0x7933273bfbd0>\ncreate_fmcg_sku_by_batch = LKBatchDTO(headers={'Authorization': 'Bearer 61f07b72-fb95-4c74-8596-1b98ca3ce1c6'}, batch_data=[{'barcode': '88439783...king_type': 'Тест-пакет', 'has_expiration_date': 'true', 'currency': 'USD', 'category': 'направо', 'brand': '045061'}])\n\n    def test_invoice_batch_upload_set_invoice_status_acceptance_in_progress(self, create_fmcg_sku_by_batch):\n        \"\"\"\n        Создаем заявку загрузкой через файл. Перемещаем инвойс до статуса 'Получено складом' ('Acceptance in progress')\n        Ожидаемый результат: заявку в статусе 'Acceptance in progress' попала в сервис Acceptance\n        \"\"\"\n        barcodes = [sku.get(\"barcode\") for sku in create_fmcg_sku_by_batch.batch_data]\n        sku_ids_and_barcodes = FMCGLKSupplyQueries().get_sku_id_and_barcode_by_barcode(barcodes)\n        invoice_data = [\n            FMCGInvoiceBatch(sku_id=str(sku.get(\"sku_id\")), barcode=sku.get(\"barcode\")).model_dump()\n            for sku in sku_ids_and_barcodes\n        ]\n        assert FMCGInvoiceBuilder(headers=create_fmcg_sku_by_batch.headers).batch_upload(\n            invoice_data\n        ), \"Invoice batch upload failed\"\n        invoice_number = FMCGLKSupplyQueries().get_invoice_status_by_barcode(barcodes[0]).get(\"invoice_number\")\n        assert invoice_number is not None, \"Invoice number is None\"\n    \n        initial_builder = FMCGInvoiceBuilder(headers=create_fmcg_sku_by_batch.headers)\n    \n        assert (\n            initial_builder.get_invoice(invoice_number).current_status == FMCGLkInvoiceStatuses.CREATED\n        ), \"Invoice status isn't CREATED\"\n    \n        assert (\n            initial_builder.update_invoice(invoice_number=invoice_number).current_status == FMCGLkInvoiceStatuses.READY\n        )\n        assert (\n            initial_builder.send_invoice(invoice_number=invoice_number).current_status\n            == FMCGLkInvoiceStatuses.ACCEPTANCE_IN_PROGRESS\n        ), \"Invoice is not in the 'Acceptance in Progress' status\"\n    \n        original_invoice_number = initial_builder.invoice.original_invoice_number\n    \n        wait_invoice(original_invoice_number=original_invoice_number, status=AcceptanceInvoiceStatus.READY)\n        invoice_data_in_acceptance = (\n            FmcgAcceptanceBuilder(headers=create_fmcg_sku_by_batch.headers)\n            .get_invoice(original_invoice_number)\n            .invoice_data\n        )\n        assert (\n            invoice_data_in_acceptance.car_license_plate\n            == initial_builder.get_invoice(invoice_number).invoice.vehicle_number\n        )\n    \n        # TO-DO: Добавить item.barcode в проверку данных в LK и в Acceptance\n        lk_data_in_cart = sorted(\n            [\n                (item.sku_id, item.quantity, item.barcode)\n                for item in FMCGCartBuilder(headers=create_fmcg_sku_by_batch.headers)\n                .get_cart_by_invoice_number(invoice_number)\n                .current_cart\n            ],\n            key=lambda x: x[1],\n        )\n        acceptance_data = sorted(\n            [(str(item.sku_id), item.expected_amount, item.barcode) for item in invoice_data_in_acceptance.items],\n            key=lambda x: x[1],\n        )\n>       assert (\n            DeepDiff(lk_data_in_cart, acceptance_data) == {}\n        ), f\"Data in LK and in acceptance are not the same\\nLK:{lk_data_in_cart}\\nAcceptance:{acceptance_data}\"\nE       AssertionError: Data in LK and in acceptance are not the same\nE         LK:[('4100000000000016983', 2, '30931314303'), ('4100000000000016984', 4, '73784294960'), ('4100000000000016982', 7, '884397838621850')]\nE         Acceptance:[('4100000000000016983', 2, ''), ('4100000000000016984', 4, ''), ('4100000000000016982', 7, '')]\nE       assert {'values_chan...7838621850'}}} == {}\nE         \nE         Left contains 1 more item:\nE         {'values_changed': {'root[0][2]': {'new_value': '', 'old_value': '30931314303'},\nE                             'root[1][2]': {'new_value': '', 'old_value': '73784294960'},\nE                             'root[2][2]': {'new_value': '',\nE                                            'old_value': '884397838621850'}}}\nE         \nE         Full diff:\nE         - {}\nE         + {\nE         +     'values_changed': {\nE         +         'root[0][2]': {\nE         +             'new_value': '',\nE         +             'old_value': '30931314303',\nE         +         },\nE         +         'root[1][2]': {\nE         +             'new_value': '',\nE         +             'old_value': '73784294960',\nE         +         },\nE         +         'root[2][2]': {\nE         +             'new_value': '',\nE         +             'old_value': '884397838621850',\nE         +         },\nE         +     },\nE         + }\n\ntests/fmcg/test_lk/test_integration.py:121: AssertionError"}, "description": "\n        Создаем заявку загрузкой через файл. Перемещаем инвойс до статуса 'Получено складом' ('Acceptance in progress')\n        Ожидаемый результат: заявку в статусе 'Acceptance in progress' попала в сервис Acceptance\n        ", "steps": [{"name": "SQLAlchemy query UNDEFINED ", "status": "passed", "attachments": [{"name": "query", "source": "509a1b86-db3f-4651-ae4d-0393967985c6-attachment.txt", "type": "text/plain"}, {"name": "params", "source": "18ad95df-8213-43c9-8ea1-f212a54167ea-attachment.json", "type": "application/json"}], "start": 1775657699603, "stop": 1775657699603}, {"name": "SQLAlchemy query UNDEFINED ", "status": "passed", "attachments": [{"name": "query", "source": "a8ce4bae-1220-4a2a-9e86-6e8d8ab356b7-attachment.txt", "type": "text/plain"}, {"name": "params", "source": "da122e2f-6c3e-44c7-a5d4-bc8aa0465441-attachment.json", "type": "application/json"}], "start": 1775657699604, "stop": 1775657699604}, {"name": "SQLAlchemy query UNDEFINED ", "status": "passed", "attachments": [{"name": "query", "source": "8154a1ad-9a58-4962-8f89-3eb2c3ccfdd9-attachment.txt", "type": "text/plain"}, {"name": "params", "source": "d5e22a9f-dfa3-4d53-b9f4-6eccf7825a48-attachment.json", "type": "application/json"}], "start": 1775657699604, "stop": 1775657699605}, {"name": "POST → https://dm-fmcg-be-service-lk.k8s-review.dailymail-tech.uz/api/v1/invoice/batch", "status": "passed", "steps": [{"name": "Request", "status": "passed", "attachments": [{"name": "request.headers", "source": "2edf0033-8fcc-433d-a3cf-48988e37e251-attachment.json", "type": "application/json"}], "start": 1775657701092, "stop": 1775657701092}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "f711abfc-2704-4a20-b83f-21b253cf966a-attachment.json", "type": "application/json"}], "start": 1775657701092, "stop": 1775657701092}], "attachments": [{"name": "cURL", "source": "d3a1a231-cc8d-4635-a37b-1f4f6e68f2e6-attachment.txt", "type": "text/plain"}], "start": 1775657701092, "stop": 1775657701092}, {"name": "GET → https://dm-fmcg-be-service-lk.k8s-review.dailymail-tech.uz/api/v1/invoice", "status": "passed", "steps": [{"name": "Request", "status": "passed", "attachments": [{"name": "request.headers", "source": "57a85d57-84cd-4a0e-b280-df62d84b7d41-attachment.json", "type": "application/json"}, {"name": "request.params", "source": "4684b5be-7eaa-4d24-bd32-d99c5532c1e2-attachment.json", "type": "application/json"}], "start": 1775657701676, "stop": 1775657701676}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "cc977586-5217-489d-9d30-f46f3a13abbb-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "d81e7e28-9da4-463e-ac96-1ef8634a7edc-attachment.json", "type": "application/json"}], "start": 1775657701676, "stop": 1775657701676}], "attachments": [{"name": "cURL", "source": "169b7993-3cba-4524-ac5e-3f04d4ae9dac-attachment.txt", "type": "text/plain"}], "start": 1775657701676, "stop": 1775657701676}, {"name": "PUT → https://dm-fmcg-be-service-lk.k8s-review.dailymail-tech.uz/api/v1/invoice?invoiceNumber=410002151", "status": "passed", "steps": [{"name": "Request", "status": "passed", "attachments": [{"name": "request.headers", "source": "8db2a46c-d4b1-4b8f-9072-37478b0b1551-attachment.json", "type": "application/json"}, {"name": "request.body", "source": "b4793ce9-cd9e-44c3-8d7a-a54b79b2da93-attachment.json", "type": "application/json"}, {"name": "request.params", "source": "1ce25d84-96b5-4578-939b-adaa810a23fd-attachment.json", "type": "application/json"}], "start": 1775657702085, "stop": 1775657702085}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "db7399dd-a5cf-4c0e-86c2-b304a4381bb8-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "a5697b68-27de-4757-821e-b4690ad9cdf4-attachment.json", "type": "application/json"}], "start": 1775657702085, "stop": 1775657702085}], "attachments": [{"name": "cURL", "source": "35865358-96e5-43a6-87ce-176ac0579e05-attachment.txt", "type": "text/plain"}], "start": 1775657702085, "stop": 1775657702085}, {"name": "POST → https://dm-fmcg-be-service-lk.k8s-review.dailymail-tech.uz/api/v1/invoice/send?invoiceNumber=410002151", "status": "passed", "steps": [{"name": "Request", "status": "passed", "attachments": [{"name": "request.headers", "source": "4d462356-64f7-44e1-8a5d-36c6051ec377-attachment.json", "type": "application/json"}, {"name": "request.params", "source": "4d4417c9-5bff-4ce0-8a3a-48ec626bdcd5-attachment.json", "type": "application/json"}], "start": 1775657702595, "stop": 1775657702595}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "e5a605ae-1a7f-49da-ac19-a26413f920f2-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "5e81c5d5-d90d-49d7-b814-5003fdf1bb96-attachment.txt", "type": "text/plain"}], "start": 1775657702595, "stop": 1775657702595}], "attachments": [{"name": "cURL", "source": "b54c57d6-1be5-4e4e-b7de-ff4fb4336704-attachment.txt", "type": "text/plain"}], "start": 1775657702594, "stop": 1775657702595}, {"name": "GET → https://dm-fmcg-be-service-lk.k8s-review.dailymail-tech.uz/api/v1/invoice", "status": "passed", "steps": [{"name": "Request", "status": "passed", "attachments": [{"name": "request.headers", "source": "4305ec0b-1007-4c64-a034-c3b3b90aa9f8-attachment.json", "type": "application/json"}, {"name": "request.params", "source": "e045c3f1-dcb4-4bf7-ae2a-4bb766350457-attachment.json", "type": "application/json"}], "start": 1775657702888, "stop": 1775657702888}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "e01dfe6b-9730-47cb-8b24-ba1427758c53-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "8017b67e-bb34-47c1-9f47-03762a345dbe-attachment.json", "type": "application/json"}], "start": 1775657702888, "stop": 1775657702889}], "attachments": [{"name": "cURL", "source": "40157ba5-5c97-4731-9b9b-dd1b8daf1209-attachment.txt", "type": "text/plain"}], "start": 1775657702888, "stop": 1775657702889}, {"name": "Waiter function: wait_invoice", "status": "passed", "steps": [{"name": "SQLAlchemy query UNDEFINED ", "status": "passed", "attachments": [{"name": "query", "source": "c969876b-3259-4ab0-898b-efddec00fc89-attachment.txt", "type": "text/plain"}, {"name": "params", "source": "f5d075cc-e7a7-4eb1-a7b4-a8a7cdee43eb-attachment.json", "type": "application/json"}], "start": 1775657702903, "stop": 1775657702903}, {"name": "SQLAlchemy query UNDEFINED ", "status": "passed", "attachments": [{"name": "query", "source": "000dde21-b444-48dd-961e-e8cad15935b0-attachment.txt", "type": "text/plain"}, {"name": "params", "source": "1f46cc99-5d57-4dd7-9a82-0bf44426812a-attachment.json", "type": "application/json"}], "start": 1775657702904, "stop": 1775657702904}, {"name": "SQLAlchemy query UNDEFINED ", "status": "passed", "attachments": [{"name": "query", "source": "d00d9ed4-9a97-469e-96ca-dfcbf444d0e7-attachment.txt", "type": "text/plain"}, {"name": "params", "source": "b3be3a61-945f-4aae-a612-cb42cf7054f2-attachment.json", "type": "application/json"}], "start": 1775657702905, "stop": 1775657702905}], "start": 1775657702892, "stop": 1775657733240}, {"name": "GET → https://dm-fmcg-be-service-acceptance.k8s-review.dailymail-tech.uz/api/v1/acceptance/invoice/26709332828", "status": "passed", "attachments": [{"name": "Request", "source": "35108c55-1f15-4bef-b490-c8805062e24f-attachment.json", "type": "application/json"}, {"name": "Response", "source": "dbe94367-99a4-42f2-8d80-058217d48d01-attachment.json", "type": "application/json"}], "start": 1775657733241, "stop": 1775657733268}, {"name": "GET → https://dm-fmcg-be-service-lk.k8s-review.dailymail-tech.uz/api/v1/invoice", "status": "passed", "steps": [{"name": "Request", "status": "passed", "attachments": [{"name": "request.headers", "source": "ea21ff96-edd3-4d08-8294-6955591327a7-attachment.json", "type": "application/json"}, {"name": "request.params", "source": "b77dfd74-73d6-4af2-9455-f6181a88d1a1-attachment.json", "type": "application/json"}], "start": 1775657733299, "stop": 1775657733299}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "e0fd9f27-b84e-4bb9-a12a-74cf11485399-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "34cfbc1e-11a7-4cd5-9b11-8805130ab87f-attachment.json", "type": "application/json"}], "start": 1775657733299, "stop": 1775657733299}], "attachments": [{"name": "cURL", "source": "7a3318d5-0809-48b8-8f18-57a431785fb1-attachment.txt", "type": "text/plain"}], "start": 1775657733299, "stop": 1775657733300}, {"name": "GET → https://dm-fmcg-be-service-lk.k8s-review.dailymail-tech.uz/api/v1/cart", "status": "passed", "steps": [{"name": "Request", "status": "passed", "attachments": [{"name": "request.headers", "source": "1a111aa1-b3ce-4d4a-a011-8541f547f6f1-attachment.json", "type": "application/json"}, {"name": "request.params", "source": "15b2edb7-f0bc-48a0-ab07-c3e9d020331f-attachment.json", "type": "application/json"}], "start": 1775657733332, "stop": 1775657733332}, {"name": "Response → 200, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "3cb5d4c0-6637-4b29-bbc9-060de017c96b-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "3acbb627-d1f5-4104-8008-0abbfe120454-attachment.json", "type": "application/json"}], "start": 1775657733332, "stop": 1775657733333}], "attachments": [{"name": "cURL", "source": "2a11491a-e0b7-4df6-a216-ecbfc7fe9aaa-attachment.txt", "type": "text/plain"}], "start": 1775657733332, "stop": 1775657733333}], "attachments": [{"name": "log", "source": "157b05cd-f0cb-4c27-a728-26e5db87eca8-attachment.txt", "type": "text/plain"}], "start": 1775657699592, "stop": 1775657733336, "uuid": "5fd82f64-7841-438d-a5b1-d4d3a328c68e", "historyId": "302f792917bf91782f0daac535ab1337", "testCaseId": "302f792917bf91782f0daac535ab1337", "fullName": "tests.fmcg.test_lk.test_integration.TestIntegrationWithAcceptanceService#test_invoice_batch_upload_set_invoice_status_acceptance_in_progress", "labels": [{"name": "tag", "value": "dm-fmcg-be-service-lk"}, {"name": "parentSuite", "value": "tests.fmcg.test_lk"}, {"name": "suite", "value": "test_integration"}, {"name": "subSuite", "value": "TestIntegrationWithAcceptanceService"}, {"name": "host", "value": "runner-1rdl4o-mi-project-9-concurrent-0-bjv59ebu"}, {"name": "thread", "value": "42-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.fmcg.test_lk.test_integration"}], "titlePath": ["tests", "fmcg", "test_lk", "test_integration.py", "TestIntegrationWithAcceptanceService"]}