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

Function token

tests/integration/test_hybrid_properties.py:192–211  ·  view source on GitHub ↗

Get a function that returns the active token. Args: hybrid_properties: harness for HybridProperties app. driver: WebDriver instance. Returns: The token for the connected client

(hybrid_properties: AppHarness, driver: WebDriver)

Source from the content-addressed store, hash-verified

190
191@pytest.fixture
192def token(hybrid_properties: AppHarness, driver: WebDriver) -> str:
193 """Get a function that returns the active token.
194
195 Args:
196 hybrid_properties: harness for HybridProperties app.
197 driver: WebDriver instance.
198
199 Returns:
200 The token for the connected client
201 """
202 assert hybrid_properties.app_instance is not None
203 token_input = AppHarness.poll_for_or_raise_timeout(
204 lambda: driver.find_element(By.ID, "token")
205 )
206
207 # wait for the backend connection to send the token
208 token = hybrid_properties.poll_for_value(token_input, timeout=DEFAULT_TIMEOUT * 2)
209 assert token is not None
210
211 return token
212
213
214def test_hybrid_properties(

Callers

nothing calls this directly

Calls 2

poll_for_valueMethod · 0.80

Tested by

no test coverage detected