Skip to content

Commit

Permalink
fix integrations for real
Browse files Browse the repository at this point in the history
  • Loading branch information
Lendemor committed Feb 14, 2025
1 parent 5ee6ad7 commit a5b8043
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions tests/integration/test_connection_banner.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,17 @@
from selenium.webdriver.common.by import By

from reflex import constants
from reflex.config import environment
from reflex.testing import AppHarness, WebDriver

from .utils import SessionStorage


def ConnectionBanner(
compile_context: constants.CompileContext = constants.CompileContext.RUN,
):
"""App with a connection banner.
Args:
compile_context: The value used to set the compile context.
"""
def ConnectionBanner():
"""App with a connection banner."""
import asyncio

import reflex as rx
from reflex.config import environment

# Simulate reflex cloud deploy
environment.REFLEX_COMPILE_CONTEXT.set(compile_context)

class State(rx.State):
foo: int = 0
Expand Down Expand Up @@ -82,11 +73,11 @@ def connection_banner(
Yields:
running AppHarness instance
"""
environment.REFLEX_COMPILE_CONTEXT.set(simulate_compile_context)

with AppHarness.create(
root=tmp_path,
app_source=functools.partial(
ConnectionBanner, compile_context=simulate_compile_context
),
app_source=functools.partial(ConnectionBanner),
app_name=(
"connection_banner_reflex_cloud"
if simulate_compile_context == constants.CompileContext.DEPLOY
Expand Down

0 comments on commit a5b8043

Please # to comment.