def test_endpoint_replacement(test_app, test_pilot):
    test_pilot.init_app(test_app)

    @test_app.route('/foo/bar/', navbar_kwargs={'path': ('Foo', 'Bar')})
    def bar():
        pass

    assert not test_pilot.navbar_entries[0].endpoint

    @test_app.route('/foo/', navbar_kwargs={'path': ('Foo',)})
    def foo():
        pass

    assert test_pilot.navbar_entries[0].endpoint
Test that missing endpoints are filled in when desired.
dataset/ETHPy150Open jonafato/Flask-Copilot/tests/test_functional.py/test_endpoint_replacement