예제 #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)
예제 #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()
예제 #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
예제 #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