mirror of
https://github.com/facefusion/facefusion.git
synced 2026-04-22 09:26:02 +02:00
remove unwanted assertions
This commit is contained in:
@@ -11,12 +11,19 @@ from facefusion.apis.core import create_api
|
||||
@pytest.fixture(scope = 'module')
|
||||
def test_client() -> Iterator[TestClient]:
|
||||
program = ArgumentParser()
|
||||
source_paths_action = program.add_argument('--source-paths', nargs = '+')
|
||||
target_path_action = program.add_argument('--target-path')
|
||||
output_format_action = program.add_argument('--output-format', default = 'mp4', choices = [ 'mp4', 'mkv', 'webm' ])
|
||||
args_store.register_argument(source_paths_action, scopes = [ 'api' ])
|
||||
args_store.register_argument(target_path_action, scopes = [ 'api' ])
|
||||
args_store.register_argument(output_format_action, scopes = [ 'api' ])
|
||||
args_store.register_argument(
|
||||
program.add_argument(
|
||||
'--source-paths',
|
||||
nargs = '+'),
|
||||
scopes = [ 'api' ]
|
||||
)
|
||||
args_store.register_argument(
|
||||
program.add_argument(
|
||||
'--output-format',
|
||||
default = 'mp4',
|
||||
choices = [ 'mp4', 'mkv', 'webm' ]),
|
||||
scopes = [ 'api' ]
|
||||
)
|
||||
|
||||
with TestClient(create_api()) as test_client:
|
||||
yield test_client
|
||||
@@ -34,18 +41,10 @@ def test_get_capabilities(test_client : TestClient) -> None:
|
||||
assert capabilities_response.status_code == 200
|
||||
|
||||
assert 'mp3' in capabilities_body.get('formats').get('audio')
|
||||
assert 'wav' in capabilities_body.get('formats').get('audio')
|
||||
assert 'flac' in capabilities_body.get('formats').get('audio')
|
||||
|
||||
assert 'jpeg' in capabilities_body.get('formats').get('image')
|
||||
assert 'png' in capabilities_body.get('formats').get('image')
|
||||
assert 'webp' in capabilities_body.get('formats').get('image')
|
||||
|
||||
assert 'mp4' in capabilities_body.get('formats').get('video')
|
||||
assert 'mkv' in capabilities_body.get('formats').get('video')
|
||||
assert 'webm' in capabilities_body.get('formats').get('video')
|
||||
|
||||
assert capabilities_body.get('arguments').get('source_paths').get('default') is None
|
||||
assert capabilities_body.get('arguments').get('target_path').get('default') is None
|
||||
assert capabilities_body.get('arguments').get('output_format').get('default') == 'mp4'
|
||||
assert capabilities_body.get('arguments').get('output_format').get('choices') == [ 'mp4', 'mkv', 'webm' ]
|
||||
|
||||
Reference in New Issue
Block a user