def test_ping_decorator(app, pool_one):
    """Tests the ping decorator is used by the connection pool."""
    ping_str = "Decorated ping"

    @pool_one.ping
    def ping(connection):
        return ping_str

    with app.app_context():
        pool = pool_one.get_pool()
        assert pool.ping(None) is ping_str