fix tests

This commit is contained in:
Jennifer Player 2024-03-06 14:26:53 -05:00 committed by Kent Keirsey
parent 4af5a09a68
commit 347f1fd0b7
4 changed files with 7 additions and 8 deletions

View File

@ -79,7 +79,6 @@ example_model_input = {
"description": "Model description",
"vae": None,
"variant": "normal",
"image": "blob",
}
##############################################################################

View File

@ -24,8 +24,8 @@ export type UpdateModelArg = {
};
export type UpdateModelImageArg = {
key: paths['/api/v2/models/i/{key}/image']['patch']['parameters']['path']['key'];
image: paths['/api/v2/models/i/{key}/image']['patch']['requestBody']['content']['multipart/form-data'];
key: string;
image: Blob;
};
type UpdateModelResponse = paths['/api/v2/models/i/{key}']['patch']['responses']['200']['content']['application/json'];
@ -155,7 +155,7 @@ export const modelsApi = api.injectEndpoints({
updateModelImage: build.mutation<UpdateModelImageResponse, UpdateModelImageArg>({
query: ({ key, image }) => {
const formData = new FormData();
formData.append('image', image.image);
formData.append('image', image);
return {
url: buildModelsUrl(`i/${key}/image`),
method: 'PATCH',

File diff suppressed because one or more lines are too long

View File

@ -44,6 +44,7 @@ def mock_services() -> InvocationServices:
images=ImageService(),
invocation_cache=MemoryInvocationCache(max_cache_size=0),
logger=logging, # type: ignore
model_images=None, # type: ignore
model_manager=None, # type: ignore
download_queue=None, # type: ignore
names=None, # type: ignore