diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index 64512d3cd..be67c1764 100755 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -50,8 +50,39 @@ def check_paths(paths): assert match is None, msg.format(path) -def test_default_configuration(cookies, context): - result = cookies.bake(extra_context=context) +@pytest.mark.parametrize("windows", BINARY_CHOICES) +@pytest.mark.parametrize("use_docker", BINARY_CHOICES) +@pytest.mark.parametrize("use_celery", BINARY_CHOICES) +@pytest.mark.parametrize("use_mailhog", BINARY_CHOICES) +@pytest.mark.parametrize("use_sentry", BINARY_CHOICES) +@pytest.mark.parametrize( + # These 2 cannot be used together, but test the other combinations + ["use_compressor", "use_whitenoise"], + [("y", "n"), ("n", "n"), ("n", "n")], +) +def test_project_generation( + cookies, + context, + windows, + use_docker, + use_celery, + use_mailhog, + use_sentry, + use_compressor, + use_whitenoise, +): + result = cookies.bake( + extra_context={ + **context, + "windows": windows, + "use_docker": use_docker, + "use_compressor": use_compressor, + "use_celery": use_celery, + "use_mailhog": use_mailhog, + "use_sentry": use_sentry, + "use_whitenoise": use_whitenoise, + } + ) assert result.exit_code == 0 assert result.exception is None assert result.project.basename == context["project_slug"] @@ -152,6 +183,8 @@ def test_black_compliance( } ) + assert result.project is not None + try: sh.black("--check", "--diff", "--exclude", "migrations", f"{result.project}/") except sh.ErrorReturnCode as e: