def test_send_not_existing_command(printer): printer.set_error('silent') with pytest.raises(ProtocolError): pkt = printer.send_command(E.not_existing(), False, True)