From 57bd6a112e61d50b8980f308bad9f1c779ba3b40 Mon Sep 17 00:00:00 2001 From: Graeme Gellatly Date: Sun, 8 Oct 2017 20:36:35 +1300 Subject: [PATCH] [To FIX] Hackish fix to test, needs to be done properly as behaviour is now part of the call to report. --- base_report_to_printer/tests/test_printing_printer.py | 6 +++--- base_report_to_printer/tests/test_report.py | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/base_report_to_printer/tests/test_printing_printer.py b/base_report_to_printer/tests/test_printing_printer.py index 8216ad7..b961d7c 100644 --- a/base_report_to_printer/tests/test_printing_printer.py +++ b/base_report_to_printer/tests/test_printing_printer.py @@ -41,14 +41,14 @@ class TestPrintingPrinter(TransactionCase): # TODO: None here used as report - tests here should be merged # with tests in test_printing_printer_tray from when modules merged self.assertEqual(self.Model.print_options( - None, doc_format='raw'), {'raw': 'True',} + None, doc_format='raw'), {'raw': 'True'} ) self.assertEqual(self.Model.print_options( - None, doc_format='pdf', copies=2), {'copies': '2',} + None, doc_format='pdf', copies=2), {'copies': '2'} ) self.assertEqual(self.Model.print_options( None, doc_format='raw', copies=2), - {'raw': 'True', 'copies': '2',} + {'raw': 'True', 'copies': '2'} ) @mock.patch('%s.cups' % server_model) diff --git a/base_report_to_printer/tests/test_report.py b/base_report_to_printer/tests/test_report.py index 8a1f5fe..c9b878b 100644 --- a/base_report_to_printer/tests/test_report.py +++ b/base_report_to_printer/tests/test_report.py @@ -90,7 +90,8 @@ class TestReport(HttpCase): records = self.env[report.model].search([], limit=5) document, doc_format = report.render_qweb_pdf(records.ids) print_document.assert_called_once_with( - report, document, report.report_type) + report, document, + action='server', doc_format='qweb-pdf', tray=False) def test_print_document_not_printable(self): """ It should print the report, regardless of the defined behaviour """