Fixtures
tomodachi_testcontainers.fixtures
Pytest fixtures.
testcontainer_image
Builds a Docker image from a Dockerfile located in the current working directory and returns an image ID.
The Docker image is removed on test session end.
Configuration environment variables (set on host machine):
TESTCONTAINER_IMAGE_ID
- use given Image ID for creating a container.TESTCONTAINER_DOCKERFILE_PATH
- override path to the Dockerfile for building Docker image.TESTCONTAINER_DOCKER_BUILD_CONTEXT
- override Docker build context.TESTCONTAINER_DOCKER_BUILD_TARGET
- override Docker build target.
YIELDS | DESCRIPTION |
---|---|
str
|
|
RECEIVES | DESCRIPTION |
---|---|
None
|
|
RETURNS | DESCRIPTION |
---|---|
None
|
|
Source code in src/tomodachi_testcontainers/fixtures/containers.py
localstack_container
YIELDS | DESCRIPTION |
---|---|
DockerContainer
|
|
RECEIVES | DESCRIPTION |
---|---|
None
|
|
RETURNS | DESCRIPTION |
---|---|
None
|
|
Source code in src/tomodachi_testcontainers/fixtures/localstack.py
localstack_dynamodb_client
async
PARAMETER | DESCRIPTION |
---|---|
localstack_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/localstack.py
localstack_iam_client
async
PARAMETER | DESCRIPTION |
---|---|
localstack_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/localstack.py
localstack_lambda_client
async
PARAMETER | DESCRIPTION |
---|---|
localstack_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/localstack.py
localstack_s3_client
async
PARAMETER | DESCRIPTION |
---|---|
localstack_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/localstack.py
localstack_sns_client
async
PARAMETER | DESCRIPTION |
---|---|
localstack_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/localstack.py
localstack_snssqs_tc
PARAMETER | DESCRIPTION |
---|---|
localstack_sns_client
|
TYPE:
|
localstack_sqs_client
|
TYPE:
|
localstack_sqs_client
async
PARAMETER | DESCRIPTION |
---|---|
localstack_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/localstack.py
localstack_ssm_client
async
PARAMETER | DESCRIPTION |
---|---|
localstack_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/localstack.py
restart_localstack_container_on_teardown
Restarts the LocalStack container after each test.
PARAMETER | DESCRIPTION |
---|---|
localstack_container
|
TYPE:
|
YIELDS | DESCRIPTION |
---|---|
None
|
|
RECEIVES | DESCRIPTION |
---|---|
None
|
|
RETURNS | DESCRIPTION |
---|---|
None
|
|
Source code in src/tomodachi_testcontainers/fixtures/localstack.py
minio_container
YIELDS | DESCRIPTION |
---|---|
DockerContainer
|
|
RECEIVES | DESCRIPTION |
---|---|
None
|
|
RETURNS | DESCRIPTION |
---|---|
None
|
|
Source code in src/tomodachi_testcontainers/fixtures/minio.py
minio_s3_client
async
PARAMETER | DESCRIPTION |
---|---|
minio_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/minio.py
moto_container
YIELDS | DESCRIPTION |
---|---|
DockerContainer
|
|
RECEIVES | DESCRIPTION |
---|---|
None
|
|
RETURNS | DESCRIPTION |
---|---|
None
|
|
Source code in src/tomodachi_testcontainers/fixtures/moto.py
moto_dynamodb_client
async
PARAMETER | DESCRIPTION |
---|---|
moto_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/moto.py
moto_iam_client
async
PARAMETER | DESCRIPTION |
---|---|
moto_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/moto.py
moto_lambda_client
async
PARAMETER | DESCRIPTION |
---|---|
moto_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/moto.py
moto_s3_client
async
PARAMETER | DESCRIPTION |
---|---|
moto_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/moto.py
moto_sns_client
async
PARAMETER | DESCRIPTION |
---|---|
moto_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/moto.py
moto_snssqs_tc
PARAMETER | DESCRIPTION |
---|---|
moto_sns_client
|
TYPE:
|
moto_sqs_client
|
TYPE:
|
moto_sqs_client
async
PARAMETER | DESCRIPTION |
---|---|
moto_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/moto.py
moto_ssm_client
async
PARAMETER | DESCRIPTION |
---|---|
moto_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/moto.py
reset_moto_container_on_teardown
Removes all mocked resources from Moto after each test without restarting the container.
PARAMETER | DESCRIPTION |
---|---|
moto_container
|
TYPE:
|
YIELDS | DESCRIPTION |
---|---|
None
|
|
RECEIVES | DESCRIPTION |
---|---|
None
|
|
RETURNS | DESCRIPTION |
---|---|
None
|
|
Source code in src/tomodachi_testcontainers/fixtures/moto.py
reset_wiremock_container_on_teardown
Deletes all stub mappings from WireMock after each test.
PARAMETER | DESCRIPTION |
---|---|
wiremock_container
|
TYPE:
|
YIELDS | DESCRIPTION |
---|---|
None
|
|
RECEIVES | DESCRIPTION |
---|---|
None
|
|
RETURNS | DESCRIPTION |
---|---|
None
|
|
Source code in src/tomodachi_testcontainers/fixtures/wiremock.py
wiremock_container
YIELDS | DESCRIPTION |
---|---|
WireMockContainer
|
|
RECEIVES | DESCRIPTION |
---|---|
None
|
|
RETURNS | DESCRIPTION |
---|---|
None
|
|
Source code in src/tomodachi_testcontainers/fixtures/wiremock.py
mysql_container
YIELDS | DESCRIPTION |
---|---|
DockerContainer
|
|
RECEIVES | DESCRIPTION |
---|---|
None
|
|
RETURNS | DESCRIPTION |
---|---|
None
|
|
Source code in src/tomodachi_testcontainers/fixtures/mysql.py
postgres_container
YIELDS | DESCRIPTION |
---|---|
DockerContainer
|
|
RECEIVES | DESCRIPTION |
---|---|
None
|
|
RETURNS | DESCRIPTION |
---|---|
None
|
|
Source code in src/tomodachi_testcontainers/fixtures/postgres.py
sftp_container
YIELDS | DESCRIPTION |
---|---|
DockerContainer
|
|
RECEIVES | DESCRIPTION |
---|---|
None
|
|
RETURNS | DESCRIPTION |
---|---|
None
|
|
Source code in src/tomodachi_testcontainers/fixtures/sftp.py
userpass_sftp_client
async
PARAMETER | DESCRIPTION |
---|---|
sftp_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/sftp.py
userssh_sftp_client
async
PARAMETER | DESCRIPTION |
---|---|
sftp_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/sftp.py
tomodachi_testcontainers.fixtures.containers
testcontainer_image
Builds a Docker image from a Dockerfile located in the current working directory and returns an image ID.
The Docker image is removed on test session end.
Configuration environment variables (set on host machine):
TESTCONTAINER_IMAGE_ID
- use given Image ID for creating a container.TESTCONTAINER_DOCKERFILE_PATH
- override path to the Dockerfile for building Docker image.TESTCONTAINER_DOCKER_BUILD_CONTEXT
- override Docker build context.TESTCONTAINER_DOCKER_BUILD_TARGET
- override Docker build target.
YIELDS | DESCRIPTION |
---|---|
str
|
|
RECEIVES | DESCRIPTION |
---|---|
None
|
|
RETURNS | DESCRIPTION |
---|---|
None
|
|
Source code in src/tomodachi_testcontainers/fixtures/containers.py
tomodachi_testcontainers.fixtures.localstack
localstack_container
YIELDS | DESCRIPTION |
---|---|
DockerContainer
|
|
RECEIVES | DESCRIPTION |
---|---|
None
|
|
RETURNS | DESCRIPTION |
---|---|
None
|
|
Source code in src/tomodachi_testcontainers/fixtures/localstack.py
restart_localstack_container_on_teardown
Restarts the LocalStack container after each test.
PARAMETER | DESCRIPTION |
---|---|
localstack_container
|
TYPE:
|
YIELDS | DESCRIPTION |
---|---|
None
|
|
RECEIVES | DESCRIPTION |
---|---|
None
|
|
RETURNS | DESCRIPTION |
---|---|
None
|
|
Source code in src/tomodachi_testcontainers/fixtures/localstack.py
localstack_dynamodb_client
async
PARAMETER | DESCRIPTION |
---|---|
localstack_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/localstack.py
localstack_iam_client
async
PARAMETER | DESCRIPTION |
---|---|
localstack_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/localstack.py
localstack_lambda_client
async
PARAMETER | DESCRIPTION |
---|---|
localstack_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/localstack.py
localstack_s3_client
async
PARAMETER | DESCRIPTION |
---|---|
localstack_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/localstack.py
localstack_sns_client
async
PARAMETER | DESCRIPTION |
---|---|
localstack_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/localstack.py
localstack_sqs_client
async
PARAMETER | DESCRIPTION |
---|---|
localstack_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/localstack.py
localstack_ssm_client
async
PARAMETER | DESCRIPTION |
---|---|
localstack_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/localstack.py
localstack_snssqs_tc
PARAMETER | DESCRIPTION |
---|---|
localstack_sns_client
|
TYPE:
|
localstack_sqs_client
|
TYPE:
|
tomodachi_testcontainers.fixtures.minio
minio_container
YIELDS | DESCRIPTION |
---|---|
DockerContainer
|
|
RECEIVES | DESCRIPTION |
---|---|
None
|
|
RETURNS | DESCRIPTION |
---|---|
None
|
|
Source code in src/tomodachi_testcontainers/fixtures/minio.py
minio_s3_client
async
PARAMETER | DESCRIPTION |
---|---|
minio_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/minio.py
tomodachi_testcontainers.fixtures.moto
moto_container
YIELDS | DESCRIPTION |
---|---|
DockerContainer
|
|
RECEIVES | DESCRIPTION |
---|---|
None
|
|
RETURNS | DESCRIPTION |
---|---|
None
|
|
Source code in src/tomodachi_testcontainers/fixtures/moto.py
reset_moto_container_on_teardown
Removes all mocked resources from Moto after each test without restarting the container.
PARAMETER | DESCRIPTION |
---|---|
moto_container
|
TYPE:
|
YIELDS | DESCRIPTION |
---|---|
None
|
|
RECEIVES | DESCRIPTION |
---|---|
None
|
|
RETURNS | DESCRIPTION |
---|---|
None
|
|
Source code in src/tomodachi_testcontainers/fixtures/moto.py
moto_dynamodb_client
async
PARAMETER | DESCRIPTION |
---|---|
moto_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/moto.py
moto_iam_client
async
PARAMETER | DESCRIPTION |
---|---|
moto_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/moto.py
moto_lambda_client
async
PARAMETER | DESCRIPTION |
---|---|
moto_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/moto.py
moto_s3_client
async
PARAMETER | DESCRIPTION |
---|---|
moto_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/moto.py
moto_sns_client
async
PARAMETER | DESCRIPTION |
---|---|
moto_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/moto.py
moto_sqs_client
async
PARAMETER | DESCRIPTION |
---|---|
moto_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/moto.py
moto_ssm_client
async
PARAMETER | DESCRIPTION |
---|---|
moto_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/moto.py
moto_snssqs_tc
PARAMETER | DESCRIPTION |
---|---|
moto_sns_client
|
TYPE:
|
moto_sqs_client
|
TYPE:
|
tomodachi_testcontainers.fixtures.mysql
mysql_container
YIELDS | DESCRIPTION |
---|---|
DockerContainer
|
|
RECEIVES | DESCRIPTION |
---|---|
None
|
|
RETURNS | DESCRIPTION |
---|---|
None
|
|
Source code in src/tomodachi_testcontainers/fixtures/mysql.py
tomodachi_testcontainers.fixtures.postgres
postgres_container
YIELDS | DESCRIPTION |
---|---|
DockerContainer
|
|
RECEIVES | DESCRIPTION |
---|---|
None
|
|
RETURNS | DESCRIPTION |
---|---|
None
|
|
Source code in src/tomodachi_testcontainers/fixtures/postgres.py
tomodachi_testcontainers.fixtures.sftp
sftp_container
YIELDS | DESCRIPTION |
---|---|
DockerContainer
|
|
RECEIVES | DESCRIPTION |
---|---|
None
|
|
RETURNS | DESCRIPTION |
---|---|
None
|
|
Source code in src/tomodachi_testcontainers/fixtures/sftp.py
userpass_sftp_client
async
PARAMETER | DESCRIPTION |
---|---|
sftp_container
|
TYPE:
|
Source code in src/tomodachi_testcontainers/fixtures/sftp.py
userssh_sftp_client
async
PARAMETER | DESCRIPTION |
---|---|
sftp_container
|
TYPE:
|