MCPcopy
hub / github.com/reflex-dev/reflex / DeployUrlSample

Function DeployUrlSample

tests/integration/test_deploy_url.py:15–32  ·  view source on GitHub ↗

Sample app for testing config deploy_url is correct (in tests).

()

Source from the content-addressed store, hash-verified

13
14
15def DeployUrlSample() -> None:
16 """Sample app for testing config deploy_url is correct (in tests)."""
17 import reflex as rx
18
19 class State(rx.State):
20 @rx.event
21 def goto_self(self):
22 if (deploy_url := rx.config.get_config().deploy_url) is not None:
23 return rx.redirect(deploy_url)
24 return None
25
26 def index():
27 return rx.fragment(
28 rx.button("GOTO SELF", on_click=State.goto_self, id="goto_self")
29 )
30
31 app = rx.App()
32 app.add_page(index)
33
34
35@pytest.fixture(scope="module")

Callers

nothing calls this directly

Calls 1

add_pageMethod · 0.95

Tested by

no test coverage detected