def test_sync_update_printer(cups, cpp): cups.test_add_printer('old') old_printer = cpp.test_add_printer('old') cloudprint.sync_printers(cups, cpp) old_printer.update.assert_called_with( old_printer.description, old_printer.ppd, )
def test_sync_rm_printer(cups, cpp): old_printer = cpp.test_add_printer('old') cloudprint.sync_printers(cups, cpp) old_printer.delete.assert_called_with()
def test_sync_add_printer(cups, cpp): cups.test_add_printer('new') cloudprint.sync_printers(cups, cpp) cpp.add_printer.assert_called_with('new', mock.ANY, mock.ANY)