[IMP] base_report_to_printer: black, isort, prettier

This commit is contained in:
Carlos Roca
2021-01-12 09:33:27 +01:00
committed by John Herholz
parent 27b944ae03
commit d03814d170
7 changed files with 20 additions and 23 deletions

View File

@@ -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()

View File

@@ -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)

View File

@@ -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."