Browse Source

do not set appharness env twice, already done in AppHarnessProd

Benedikt Bartscher 6 months ago
parent
commit
4116ab9f66
1 changed files with 4 additions and 8 deletions
  1. 4 8
      tests/integration/conftest.py

+ 4 - 8
tests/integration/conftest.py

@@ -3,7 +3,7 @@
 import os
 import re
 from pathlib import Path
-from typing import Generator, Type
+from typing import Type
 
 import pytest
 
@@ -81,18 +81,14 @@ def pytest_exception_interact(node, call, report):
 )
 def app_harness_env(
     request: pytest.FixtureRequest,
-) -> Generator[Type[AppHarness], None, None]:
+) -> Type[AppHarness]:
     """Parametrize the AppHarness class to use for the test, either dev or prod.
 
     Args:
         request: The pytest fixture request object.
 
-    Yields:
+    Returns:
         The AppHarness class to use for the test.
     """
     harness: Type[AppHarness] = request.param
-    if issubclass(harness, AppHarnessProd):
-        EnvironmentVariables.REFLEX_ENV_MODE.set(reflex.constants.Env.PROD)
-    yield harness
-    if issubclass(harness, AppHarnessProd):
-        EnvironmentVariables.REFLEX_ENV_MODE.set(None)
+    return harness