<gh_stars>1-10
from pathlib import Path
from shutil import rmtree

from scalade.cli import FIXTURES_DIR, CLIUtils


def test_cli_utils(job_uuid):
    CLIUtils.generate_token(job_uuid)

    CLIUtils.start_function("fake_func", "random-names", "/tmp/")
    rmtree("/tmp/fake_func")

    config_dir = (
        Path(FIXTURES_DIR) / "python" / "random-names" / "src" / "function.yml"
    ).as_posix()
    CLIUtils.verify_config(config_dir)
