Files
facefusion/tests/test_curl_builder.py
Henry Ruhs 8a9e08f3a2 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
2025-04-28 10:03:24 +02:00

18 lines
439 B
Python

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') ]