5c09e22358
build and deploy Speckle functions / publish-automate-function-version (push) Has been cancelled
- Simplified email check method to ensure param_value is a string. - Streamlined apply method for better handling of parameter values. - Enhanced error handling when accessing parameters in Base objects. - Added debug counters for processed objects in the ParameterProcessor class. - Updated test cases to reflect changes in input parameters.
32 lines
1012 B
Python
32 lines
1012 B
Python
"""Run integration tests with a speckle server."""
|
|
|
|
from speckle_automate import (
|
|
AutomationContext,
|
|
AutomationRunData,
|
|
AutomationStatus,
|
|
run_function,
|
|
)
|
|
from speckle_automate.fixtures import *
|
|
|
|
from data_shield.function import FunctionInputs, SanitizationMode, automate_function
|
|
|
|
|
|
class TestFunction:
|
|
"""Test the automate function."""
|
|
|
|
def test_function_run(self, test_automation_run_data: AutomationRunData, test_automation_token: str) -> None:
|
|
"""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(
|
|
sanitization_mode=SanitizationMode.ANONYMIZATION,
|
|
parameter_input="SPECKLE",
|
|
strict_mode=False,
|
|
),
|
|
)
|
|
|
|
assert automate_sdk.run_status == AutomationStatus.SUCCEEDED
|