diff --git a/tests/auxiliary_files/test_copy_theme_files_to_output_directory_custom_theme/dummytheme/theme_auxiliary_dir/theme_auxiliary_file.txt b/tests/auxiliary_files/test_copy_theme_files_to_output_directory_custom_theme/dummytheme/theme_auxiliary_dir/theme_auxiliary_file.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auxiliary_files/test_copy_theme_files_to_output_directory_custom_theme/theme_auxiliary_files/theme_auxiliary_dir/theme_auxiliary_file.txt b/tests/auxiliary_files/test_copy_theme_files_to_output_directory_custom_theme/theme_auxiliary_files/theme_auxiliary_dir/theme_auxiliary_file.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_data_models.py b/tests/test_data_models.py index ffcf59d..c412f0a 100644 --- a/tests/test_data_models.py +++ b/tests/test_data_models.py @@ -93,11 +93,20 @@ def test_read_input_file_invalid_file(tmp_path): dm.read_input_file(invalid_file_path) -def test_get_a_sample_data_model(): - data_model = dm.get_a_sample_data_model("John Doe") +@pytest.mark.parametrize( + "theme", + dm.available_themes, +) +def test_get_a_sample_data_model(theme): + data_model = dm.get_a_sample_data_model("John Doe", theme) assert isinstance(data_model, dm.RenderCVDataModel) +def test_get_a_sample_data_model_invalid_theme(): + with pytest.raises(ValueError): + dm.get_a_sample_data_model("John Doe", "invalid") + + def test_generate_json_schema(): schema = dm.generate_json_schema() assert isinstance(schema, dict) diff --git a/tests/test_renderer.py b/tests/test_renderer.py index 3f4de94..4a56adb 100644 --- a/tests/test_renderer.py +++ b/tests/test_renderer.py @@ -416,6 +416,11 @@ def test_copy_theme_files_to_output_directory_custom_theme( pathlib.Path(custom_theme_directory_path / "theme_auxiliary_dir").mkdir( exist_ok=True ) + pathlib.Path( + custom_theme_directory_path + / "theme_auxiliary_dir" + / "theme_auxiliary_file.txt" + ).touch() init_file = pathlib.Path(custom_theme_directory_path / "__init__.py") init_file.touch()