4bcf005f4a
* chore: bump specklepy * refactor: requirements files * refactor: dockerfile * refactor: update GitHub actions * refactor: update devcontainer config * docs: updated `README` * docs: better explanations * docs: wording * chore: dependabot config * docs: keeping things in sync * fix: skip pip upgrade * refactor: updated devcontainer * refactor: toml instead of requirements * refactor: update docker * docs: updated `README` * chore: classifiers does nothing * chore: wrap up the v3 transition --------- Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
32 lines
892 B
Python
32 lines
892 B
Python
"""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
|