mirror of
https://github.com/OCA/report-print-send.git
synced 2025-02-16 07:11:31 +02:00
[To FIX] Hackish fix to test, needs to be done properly as behaviour is now part of the call to report.
This commit is contained in:
@@ -41,14 +41,14 @@ class TestPrintingPrinter(TransactionCase):
|
|||||||
# TODO: None here used as report - tests here should be merged
|
# TODO: None here used as report - tests here should be merged
|
||||||
# with tests in test_printing_printer_tray from when modules merged
|
# with tests in test_printing_printer_tray from when modules merged
|
||||||
self.assertEqual(self.Model.print_options(
|
self.assertEqual(self.Model.print_options(
|
||||||
None, doc_format='raw'), {'raw': 'True',}
|
None, doc_format='raw'), {'raw': 'True'}
|
||||||
)
|
)
|
||||||
self.assertEqual(self.Model.print_options(
|
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(
|
self.assertEqual(self.Model.print_options(
|
||||||
None, doc_format='raw', copies=2),
|
None, doc_format='raw', copies=2),
|
||||||
{'raw': 'True', 'copies': '2',}
|
{'raw': 'True', 'copies': '2'}
|
||||||
)
|
)
|
||||||
|
|
||||||
@mock.patch('%s.cups' % server_model)
|
@mock.patch('%s.cups' % server_model)
|
||||||
|
|||||||
@@ -90,7 +90,8 @@ class TestReport(HttpCase):
|
|||||||
records = self.env[report.model].search([], limit=5)
|
records = self.env[report.model].search([], limit=5)
|
||||||
document, doc_format = report.render_qweb_pdf(records.ids)
|
document, doc_format = report.render_qweb_pdf(records.ids)
|
||||||
print_document.assert_called_once_with(
|
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):
|
def test_print_document_not_printable(self):
|
||||||
""" It should print the report, regardless of the defined behaviour """
|
""" It should print the report, regardless of the defined behaviour """
|
||||||
|
|||||||
Reference in New Issue
Block a user