Last active
November 23, 2017 13:31
-
-
Save JayH5/cd94c3119c58d72be528a6b4a3858fb1 to your computer and use it in GitHub Desktop.
Django container pytest fixture
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create definition instances | |
socket_volume = VolumeDefinition("socket") | |
static_volume = VolumeDefinition("static") | |
django_container = DjangoContainer("django", socket_volume, static_volume, | |
postgresql_container.database_url()) | |
# Create pytest fixtures | |
socket_volume_fixture = socket_volume.pytest_fixture("socket_volume") | |
static_volume_fixture = static_volume.pytest_fixture("static_volume") | |
django_fixture = django_container.pytest_fixture( | |
"django_container", | |
dependencies=["socket_volume", "static_volume", "postgresql_container"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment