Feat/commands builder (#852)
* Protype for ffmpeg builder * Protype for ffmpeg builder * Add curl builder * Fix typing import * Adjust commands indent * Protype for ffmpeg builder part2 * Protype for ffmpeg builder part3 * Protype for ffmpeg builder part3 * Add chain() helper to the builders * Protype for ffmpeg builder part4 * Protype for ffmpeg builder part5 * Protoype for ffmpeg builder part5 * Protoype for ffmpeg builder part6 * Allow dynamic audio size * Fix testing * Protoype for ffmpeg builder part7 * Fix and polish ffmpeg builder * Hardcode the log level for ffmpeg * More ffmpeg rework * Prototype for ffmpeg builder part8 * Prototype for ffmpeg builder part9 * Fix CI * Fix Styles * Add lazy testing, User Agent for CURL * More testing * More testing
This commit is contained in:
17
tests/test_curl_builder.py
Normal file
17
tests/test_curl_builder.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from shutil import which
|
||||
|
||||
from facefusion import curl_builder, metadata
|
||||
|
||||
|
||||
def test_run() -> None:
|
||||
user_agent = metadata.get('name') + '/' + metadata.get('version')
|
||||
|
||||
assert curl_builder.run([]) == [ which('curl'), '--user-agent', user_agent, '--insecure', '--location', '--silent' ]
|
||||
|
||||
|
||||
def test_chain() -> None:
|
||||
commands = curl_builder.chain(
|
||||
curl_builder.head(metadata.get('url'))
|
||||
)
|
||||
|
||||
assert commands == [ '-I', metadata.get('url') ]
|
||||
Reference in New Issue
Block a user