mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(tests): fix missing services in tests; fix ImageField instantiation
This commit is contained in:
parent
3000436121
commit
96adb56633
@ -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]:
|
||||
|
@ -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()
|
||||
|
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user