mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-02-03 05:04:25 +03:00
Implement parametrized test for enabled features
This commit is contained in:
parent
646e376a8e
commit
f579cf08ac
|
@ -59,3 +59,21 @@ def test_default_configuration(cookies, context):
|
||||||
paths = build_files_list(str(result.project))
|
paths = build_files_list(str(result.project))
|
||||||
assert paths
|
assert paths
|
||||||
check_paths(paths)
|
check_paths(paths)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(params=['use_maildump', 'use_celery', 'windows'])
|
||||||
|
def feature_context(request, context):
|
||||||
|
context.update({request.param: 'y'})
|
||||||
|
return context
|
||||||
|
|
||||||
|
|
||||||
|
def test_enabled_features(cookies, feature_context):
|
||||||
|
result = cookies.bake(extra_context=feature_context)
|
||||||
|
assert result.exit_code == 0
|
||||||
|
assert result.exception is None
|
||||||
|
assert result.project.basename == feature_context['repo_name']
|
||||||
|
assert result.project.isdir()
|
||||||
|
|
||||||
|
paths = build_files_list(str(result.project))
|
||||||
|
assert paths
|
||||||
|
check_paths(paths)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user