def test_create_project_with_django(tmpfolder):
    # Given options with the django extension,
    opts = dict(project=PROJ_NAME, extensions=[django.Django('django')])

    # when the project is created,
    create_project(opts)

    # then django files should exist
    for path in DJANGO_FILES:
        assert path_exists(path)
    # and also overwritable pyscaffold files (with the exact contents)
    tmpfolder.join(PROJ_NAME).join("setup.py").read() == setup_py(opts)
Beispiel #2
0
def test_create_project_with_django(tmpfolder):
    # Given options with the django extension,
    opts = dict(project=PROJ_NAME, extensions=[django.Django('django')])

    # when the project is created,
    create_project(opts)

    # then django files should exist
    for path in DJANGO_FILES:
        assert path_exists(path)
    # and also overwritable pyscaffold files (with the exact contents)
    tmpfolder.join(PROJ_NAME).join("setup.py").read() == setup_py(opts)
def test_create_project_with_cookiecutter(tmpfolder):
    # Given options with the cookiecutter extension,
    opts = dict(project=PROJ_NAME,
                cookiecutter=COOKIECUTTER_URL,
                extensions=[cookiecutter.Cookiecutter('cookiecutter')])

    # when the project is created,
    create_project(opts)

    # then cookiecutter files should exist
    for path in COOKIECUTTER_FILES:
        assert path_exists(path)
    # and also overwritable pyscaffold files (with the exact contents)
    tmpfolder.join(PROJ_NAME).join("setup.py").read() == setup_py(opts)
def test_create_project_with_cookiecutter(tmpfolder):
    # Given options with the cookiecutter extension,
    opts = dict(project=PROJ_NAME,
                cookiecutter=COOKIECUTTER_URL,
                extensions=[cookiecutter.Cookiecutter('cookiecutter')])

    # when the project is created,
    create_project(opts)

    # then cookiecutter files should exist
    for path in COOKIECUTTER_FILES:
        assert path_exists(path)
    # and also overwritable pyscaffold files (with the exact contents)
    tmpfolder.join(PROJ_NAME).join("setup.py").read() == setup_py(opts)