Feat(WIP): Lineas Eliminadas

This commit is contained in:
2024-10-20 12:46:10 -05:00
parent d1482056c0
commit bff20cbd72
3 changed files with 45 additions and 9 deletions

View File

@@ -0,0 +1,13 @@
{
"party": "00-Consumidor Final",
"tax_identifier_type": "NIT",
"tax_identifier_code": "222222222",
"address": "Dg 74A #C-2-56",
"city": "Medellín",
"zone": "SALON",
"table": "SL5",
"lines": [],
"deleted_lines": [
{"product": "Playa Girón", "quantity": -1.0, "unit": "Media Unidad"},
{"product": "Ciclobi", "quantity": -1.0, "unit": "Media Unidad"}
]}

View File

@@ -43,13 +43,30 @@ def test_print_customer_order():
assert response.content.decode() == "!Impresion Realizada!"
def test_print_customer_order_deleted_lines():
test_info = {
"content": str(
json.dumps(
load_json(
'test/fixtures/customer_order_deleted_lines.json')
)),
"ip_printer": "192.168.1.110",
"user_name": "Juan"
}
response = client.post("/order_kitchen", json=test_info)
assert response.status_code == 200
assert response.content.decode() == "!Impresion Realizada!"
def test_print_bar_order():
test_info = {
"content": str(
json.dumps(
load_json('test/fixtures/customer_order.json')
)),
"ip_printer": "192.168.1.100",
"ip_printer": "192.168.1.110",
"user_name": "Juan"
}