Files
Dorod-Sky/tests/unit/conftest.py

31 lines
777 B
Python
Raw Normal View History

# -- begin speed up unit tests
import pytest
from tests.unit.force_stub_app import start_forge_stub_app
# NOTE(jdo): uncomment below to run tests faster, if you're targetting smth
# that does not need the full app context
# import sys
# from unittest.mock import MagicMock
# mock_modules = [
# "skyvern.forge.app",
# "skyvern.library",
# "skyvern.core.script_generations.skyvern_page",
# "skyvern.core.script_generations.run_initializer",
# "skyvern.core.script_generations.workflow_wrappers",
# "skyvern.services.script_service",
# ]
# for module in mock_modules:
# sys.modules[module] = MagicMock()
# -- end speed up unit tests
@pytest.fixture(scope="module", autouse=True)
def setup_forge_stub_app():
start_forge_stub_app()
yield