mirror of
https://github.com/facefusion/facefusion.git
synced 2026-06-08 13:43:52 +02:00
Revamp the upload
This commit is contained in:
@@ -128,7 +128,7 @@ def test_upload_target_asset(test_client : TestClient) -> None:
|
||||
})
|
||||
|
||||
assert upload_response.status_code == 201
|
||||
assert upload_response.json().get('asset_id')
|
||||
assert upload_response.json().get('asset_ids')
|
||||
|
||||
|
||||
def test_upload_unsupported_format(test_client : TestClient) -> None:
|
||||
@@ -143,7 +143,7 @@ def test_upload_unsupported_format(test_client : TestClient) -> None:
|
||||
'Authorization': 'Bearer ' + create_session_body.get('access_token')
|
||||
}, files =
|
||||
{
|
||||
'file': ('test.txt', b'invalid content', 'text/plain')
|
||||
'file': ('test.txt', b'invalid', 'text/plain')
|
||||
})
|
||||
|
||||
assert upload_response.status_code == 400
|
||||
|
||||
@@ -113,8 +113,8 @@ def test_select_source_assets(test_client : TestClient) -> None:
|
||||
]
|
||||
asset_ids =\
|
||||
[
|
||||
asset_store.create_asset(session_id, 'source', 'image', source_paths[0]).get('id'),
|
||||
asset_store.create_asset(session_id, 'source', 'image', source_paths[1]).get('id')
|
||||
asset_store.create_asset(session_id, 'source', source_paths[0]).get('id'),
|
||||
asset_store.create_asset(session_id, 'source', source_paths[1]).get('id')
|
||||
]
|
||||
|
||||
select_response = test_client.put('/state?action=select&type=source', json =
|
||||
@@ -156,7 +156,7 @@ def test_select_target_assets(test_client : TestClient) -> None:
|
||||
access_token = create_session_body.get('access_token')
|
||||
session_id = session_manager.find_session_id(access_token)
|
||||
target_path = get_test_example_file('target-240p.jpg')
|
||||
asset_id = asset_store.create_asset(session_id, 'target', 'image', target_path).get('id')
|
||||
asset_id = asset_store.create_asset(session_id, 'target', target_path).get('id')
|
||||
|
||||
select_response = test_client.put('/state?action=select&type=target', json=
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user