mirror of
https://github.com/OCA/report-print-send.git
synced 2025-02-16 07:11:31 +02:00
[MIG] printer_zpl2 to v13 (continue)
This commit is contained in:
@@ -67,8 +67,11 @@ class TestPrintingLabelZpl2(TransactionCase):
|
||||
def test_print_empty_label(self, cups):
|
||||
""" Check that printing an empty label works """
|
||||
label = self.new_label()
|
||||
file_name = 'test.zpl'
|
||||
label.print_label(self.printer, self.printer)
|
||||
cups.Connection().printFile.assert_called_once()
|
||||
cups.Connection().printFile.assert_called_once_with(
|
||||
printer.system_name, file_name, file_name, options={}
|
||||
)
|
||||
|
||||
def test_empty_label_contents(self):
|
||||
""" Check contents of an empty label """
|
||||
|
||||
@@ -51,8 +51,11 @@ class TestWizardPrintRecordLabel(TransactionCase):
|
||||
self.label.test_print_mode = True
|
||||
self.label.printer_id = self.printer
|
||||
self.label.record_id = 10
|
||||
self.label.print_test_label()
|
||||
cups.Connection().printFile.assert_called_once()
|
||||
file_name = 'test.zpl'
|
||||
self.label.print_test_label()
|
||||
cups.Connection().printFile.assert_called_once_with(
|
||||
self.printer.system_name, file_name, file_name, options={}
|
||||
)
|
||||
|
||||
def test_emulation_without_params(self):
|
||||
""" Check if not execute next if not in this mode """
|
||||
|
||||
@@ -48,7 +48,10 @@ class TestWizardPrintRecordLabel(TransactionCase):
|
||||
self.assertEqual(wizard.printer_id, self.printer)
|
||||
self.assertEqual(wizard.label_id, self.label)
|
||||
wizard.print_label()
|
||||
cups.Connection().printFile.assert_called_once()
|
||||
file_name = 'test.zpl'
|
||||
cups.Connection().printFile.assert_called_once_with(
|
||||
self.printer.system_name, file_name, file_name, options={}
|
||||
)
|
||||
|
||||
def test_wizard_multiple_printers_and_labels(self):
|
||||
""" Check that printer_id and label_id are not automatically filled
|
||||
|
||||
Reference in New Issue
Block a user