mirror of
https://github.com/OCA/report-print-send.git
synced 2025-02-16 07:11:31 +02:00
[IMP] base_report_to_printer: black, isort, prettier
This commit is contained in:
committed by
John Herholz
parent
27b944ae03
commit
d03814d170
@@ -133,8 +133,7 @@ class TestIrActionsReportXml(TransactionCase):
|
||||
)
|
||||
|
||||
def test_behaviour_printing_action_on_wrong_user(self):
|
||||
""" It should return the action and printer ignoring printing action
|
||||
"""
|
||||
"""It should return the action and printer ignoring printing action"""
|
||||
report = self.Model.search([], limit=1)
|
||||
self.env.user.printing_action = "client"
|
||||
printing_action = self.new_printing_action()
|
||||
@@ -147,8 +146,7 @@ class TestIrActionsReportXml(TransactionCase):
|
||||
)
|
||||
|
||||
def test_behaviour_printing_action_on_wrong_report(self):
|
||||
""" It should return the action and printer ignoring printing action
|
||||
"""
|
||||
"""It should return the action and printer ignoring printing action"""
|
||||
report = self.Model.search([], limit=1)
|
||||
self.env.user.printing_action = "client"
|
||||
printing_action = self.new_printing_action()
|
||||
|
||||
@@ -98,7 +98,8 @@ class TestPrintingServer(TransactionCase):
|
||||
cups.Connection().getPrinters().get.return_value = False
|
||||
self.Model.action_update_printers()
|
||||
self.assertEqual(
|
||||
"unavailable", rec_id.status,
|
||||
"unavailable",
|
||||
rec_id.status,
|
||||
)
|
||||
|
||||
@mock.patch("%s.cups" % model)
|
||||
|
||||
@@ -82,8 +82,7 @@ class TestReport(common.HttpCase):
|
||||
self.assertFalse(res)
|
||||
|
||||
def test_render_qweb_pdf_not_printable(self):
|
||||
""" It should print the report, only if it is printable
|
||||
"""
|
||||
"""It should print the report, only if it is printable"""
|
||||
with mock.patch(
|
||||
"odoo.addons.base_report_to_printer.models."
|
||||
"printing_printer.PrintingPrinter."
|
||||
@@ -93,8 +92,7 @@ class TestReport(common.HttpCase):
|
||||
print_document.assert_not_called()
|
||||
|
||||
def test_render_qweb_pdf_printable(self):
|
||||
""" It should print the report, only if it is printable
|
||||
"""
|
||||
"""It should print the report, only if it is printable"""
|
||||
with mock.patch(
|
||||
"odoo.addons.base_report_to_printer.models."
|
||||
"printing_printer.PrintingPrinter."
|
||||
|
||||
Reference in New Issue
Block a user