diff --git a/panel/tests/ui/test_auth.py b/panel/tests/ui/test_auth.py index 41e02e7ce1..108c9eb2de 100644 --- a/panel/tests/ui/test_auth.py +++ b/panel/tests/ui/test_auth.py @@ -178,6 +178,8 @@ def test_auth0_oauth_via_proxy(py_file, page): app = "import panel as pn; pn.pane.Markdown(pn.state.user).servable(title='A')" write_file(app, py_file.file) + app_name = os.path.basename(py_file.name)[:-3] + proxy = os.environ.get('AUTH0_PORT', '5701') cookie_secret = os.environ['OAUTH_COOKIE_SECRET'] encryption_key = os.environ['OAUTH_ENCRYPTION_KEY'] @@ -196,8 +198,8 @@ def test_auth0_oauth_via_proxy(py_file, page): py_file.name ] with run_panel_serve(cmd) as p: - port = wait_for_port(p.stdout) - page.goto(f"http://localhost:{port}") + wait_for_port(p.stdout) + page.goto(f"http://localhost:{proxy}/proxy/{app_name}") page.locator('input[name="username"]').fill(auth0_user) page.locator('input[name="password"]').fill(auth0_password)