Feat: Test customer_order, bar_order
This commit is contained in:
@@ -11,6 +11,7 @@ def load_json(file_path):
|
||||
with open(file_path, 'r') as filejson:
|
||||
return json.load(filejson)
|
||||
|
||||
|
||||
def test_print_bill():
|
||||
test_info = {
|
||||
"content": str(
|
||||
@@ -24,3 +25,35 @@ def test_print_bill():
|
||||
response = client.post("/print_bill", json=test_info)
|
||||
assert response.status_code == 200
|
||||
assert response.content.decode() == "!Impresion Realizada!"
|
||||
|
||||
|
||||
def test_print_customer_order():
|
||||
test_info = {
|
||||
"content": str(
|
||||
json.dumps(
|
||||
load_json('test/fixtures/customer_order.json')
|
||||
)),
|
||||
"ip_printer": "192.168.1.100",
|
||||
"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",
|
||||
"user_name": "Juan"
|
||||
}
|
||||
|
||||
response = client.post("/order_bar", json=test_info)
|
||||
|
||||
assert response.status_code == 200
|
||||
assert response.content.decode() == "!Impresion Realizada!"
|
||||
|
||||
Reference in New Issue
Block a user