Initial commit

This commit is contained in:
NLSA
2026-03-23 09:54:04 +01:00
committed by GitHub
commit 357498eeb4
17 changed files with 1047 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
"""Tests for the automate function."""
+31
View File
@@ -0,0 +1,31 @@
"""Run integration tests with a speckle server."""
from pydantic import SecretStr
from speckle_automate import (
AutomationContext,
AutomationRunData,
AutomationStatus,
run_function,
)
from speckle_automate.fixtures import * # noqa: F403
from main import FunctionInputs, automate_function
def test_function_run(
test_automation_run_data: AutomationRunData, test_automation_token: str
):
"""Run an integration test for the automate function."""
automation_context = AutomationContext.initialize(
test_automation_run_data, test_automation_token
)
automate_sdk = run_function(
automation_context,
automate_function,
FunctionInputs(
forbidden_speckle_type="None",
whisper_message=SecretStr("testing automatically"),
),
)
assert automate_sdk.run_status == AutomationStatus.SUCCEEDED