mirror of
https://github.com/OCA/report-print-send.git
synced 2025-02-16 07:11:31 +02:00
[IMP] base_report_to_printer: archive printers
This commit is contained in:
committed by
John Herholz
parent
74018a0935
commit
27b944ae03
@@ -89,6 +89,18 @@ class TestPrintingServer(TransactionCase):
|
||||
self.Model.action_update_printers()
|
||||
self.assertEqual("unavailable", rec_id.status)
|
||||
|
||||
@mock.patch("%s.cups" % model)
|
||||
def test_update_archived_printers(self, cups):
|
||||
""" It should update status even if printer is archived """
|
||||
rec_id = self.new_printer()
|
||||
rec_id.toggle_active()
|
||||
self.server.refresh()
|
||||
cups.Connection().getPrinters().get.return_value = False
|
||||
self.Model.action_update_printers()
|
||||
self.assertEqual(
|
||||
"unavailable", rec_id.status,
|
||||
)
|
||||
|
||||
@mock.patch("%s.cups" % model)
|
||||
def test_update_jobs_cron(self, cups):
|
||||
""" It should get all jobs from CUPS server """
|
||||
|
||||
Reference in New Issue
Block a user