diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index 017540d95..061a0f28d 100755 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -55,11 +55,8 @@ def check_paths(paths): @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")], -) +@pytest.mark.parametrize("use_compressor", BINARY_CHOICES) +@pytest.mark.parametrize("use_whitenoise", BINARY_CHOICES) def test_project_generation( cookies, context, @@ -98,11 +95,8 @@ def test_project_generation( @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")], -) +@pytest.mark.parametrize("use_compressor", BINARY_CHOICES) +@pytest.mark.parametrize("use_whitenoise", BINARY_CHOICES) def test_linting_passes( cookies, windows, @@ -113,7 +107,7 @@ def test_linting_passes( use_compressor, use_whitenoise, ): - """generated project should pass flake8""" + """generated project should pass flake8 & black.""" result = cookies.bake( extra_context={ "windows": windows, diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index 546f2364f..3db964b66 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -182,7 +182,7 @@ COMPRESS_ENABLED = env.bool("COMPRESS_ENABLED", default=True) # https://django-compressor.readthedocs.io/en/latest/settings/#django.conf.settings.COMPRESS_STORAGE COMPRESS_STORAGE = "storages.backends.s3boto3.S3Boto3Storage" # https://django-compressor.readthedocs.io/en/latest/settings/#django.conf.settings.COMPRESS_URL -COMPRESS_URL = STATIC_URL +COMPRESS_URL = STATIC_URL{% if cookiecutter.use_whitenoise == 'y' %} # noqa F405{% endif %} {% endif %} {%- if cookiecutter.use_whitenoise == 'n' -%} # Collectfast