Beispiel #1
0
def test_cli_to_dict_without_path(tmp_path, monkeypatch):
    config_path = tmp_path / 'freezeyt.conf'
    app_name = 'app_with_extra_files'

    config_path.write_text('output: {type: dict}')

    run_freezeyt_cli(['app', '-c', config_path], app_name)
Beispiel #2
0
def test_cli_to_files(tmp_path, monkeypatch):
    builddir = tmp_path / 'build'
    app_name = 'app_2pages'

    run_freezeyt_cli(['app', str(builddir)], app_name)

    assert (builddir / 'index.html').exists()
    assert (builddir / 'second_page.html').exists()
Beispiel #3
0
def test_cli_to_dict_with_config_and_path(tmp_path, monkeypatch):
    builddir = tmp_path / 'build'
    config_path = tmp_path / 'freezeyt.conf'
    app_name = 'app_with_extra_files'

    config_path.write_text('output: {type: dict}')

    result = run_freezeyt_cli(
        ['app', '-c', config_path, str(builddir)], app_name, check=False)
    assert result.exit_code != 0
Beispiel #4
0
def test_cli_without_path_and_output(tmp_path, monkeypatch):
    app_name = 'app_with_extra_files'

    result = run_freezeyt_cli(['app'], app_name, check=False)
    assert result.exit_code != 0