-
Notifications
You must be signed in to change notification settings - Fork 77
Open
Description
Most projects need some kind of initialization. So far I am copy-pasting this kind of scripts all over the projects
import pytest
import textwrap
@pytest.fixture(scope="session")
def backend_init(docker_services):
def backend_run(command):
docker_services._docker_compose.execute(
"run --rm backend " + textwrap.dedent(command))
backend_run("python -m django migrate")
backend_run("python -m django configure")
backend_run("""\
bash <<EOF
set -exo pipefail
pip install pipenv
pipenv install --dev --deploy
python -m django load-fake-data
EOF
""")
returnThis sort of works, but I wonder if it would be worth to have some kind of utility to address this kind of need in pytest-docker.
Also, using docker_services._docker_compose.execute feels odd.
Metadata
Metadata
Assignees
Labels
No labels