fix(tests): fix missing services in tests; fix ImageField instantiation

This commit is contained in:
psychedelicious 2023-05-25 10:23:25 +10:00
parent 3000436121
commit 96adb56633
3 changed files with 3 additions and 1 deletions

View File

@ -35,6 +35,7 @@ def mock_services():
graph_execution_manager = SqliteItemStorage[GraphExecutionState](filename = sqlite_memory, table_name = 'graph_executions'),
processor = DefaultInvocationProcessor(),
restoration = None, # type: ignore
configuration = None, # type: ignore
)
def invoke_next(g: GraphExecutionState, services: InvocationServices) -> tuple[BaseInvocation, BaseInvocationOutput]:

View File

@ -33,6 +33,7 @@ def mock_services() -> InvocationServices:
graph_execution_manager = SqliteItemStorage[GraphExecutionState](filename = sqlite_memory, table_name = 'graph_executions'),
processor = DefaultInvocationProcessor(),
restoration = None, # type: ignore
configuration = None, # type: ignore
)
@pytest.fixture()

View File

@ -49,7 +49,7 @@ class ImageTestInvocation(BaseInvocation):
prompt: str = Field(default = "")
def invoke(self, context: InvocationContext) -> ImageTestInvocationOutput:
return ImageTestInvocationOutput(image=ImageField(image_name=self.id, width=512, height=512, mode="", info={}))
return ImageTestInvocationOutput(image=ImageField(image_name=self.id))
class PromptCollectionTestInvocationOutput(BaseInvocationOutput):
type: Literal['test_prompt_collection_output'] = 'test_prompt_collection_output'