tests: fix nodes tests

they now require a valid output
This commit is contained in:
psychedelicious 2024-04-27 19:24:21 +10:00
parent 5a4dc9bbce
commit f526f0ae5f

View File

@ -34,6 +34,7 @@ from .test_nodes import (
PolymorphicStringTestInvocation,
PromptCollectionTestInvocation,
PromptTestInvocation,
PromptTestInvocationOutput,
TextToImageTestInvocation,
)
@ -509,7 +510,7 @@ def test_invocation_decorator():
@invocation(invocation_type, title=title, tags=tags, category=category, version=version)
class TestInvocation(BaseInvocation):
def invoke(self):
def invoke(self) -> PromptTestInvocationOutput:
pass
schema = TestInvocation.model_json_schema()
@ -527,7 +528,7 @@ def test_invocation_version_must_be_semver():
@invocation("test_invocation_version_valid", version=valid_version)
class ValidVersionInvocation(BaseInvocation):
def invoke(self):
def invoke(self) -> PromptTestInvocationOutput:
pass
with pytest.raises(InvalidVersionError):