def client_request_flash(): """Request that the server flashes the current window.""" logging.info("Connecting to the flashfocus daemon...") sock = init_client_socket() logging.info("Connection established, sending flash request...") # Just send a single byte to the server. Contents are unimportant. sock.sendall(bytearray("1", encoding="UTF-8"))
def client_socket(server_socket): """Client socket instance.""" return init_client_socket()
def test_init_client_socket_without_server(): with raises(SystemExit) as error: init_client_socket() assert "Error:" in str(error.value)