Exemplo n.º 1
0
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,
    )
Exemplo n.º 2
0
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()
Exemplo n.º 3
0
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)