Skip to main content

Provides test utilities to run fabric task tests by using docker containers

Project description


  • Python 2.7
  • Fabric 1.14.0

TODOs (will make into issues eventually)

  • Only runs one host right now if using fabric_host fixture (Support multiple container)


fabric_host will set up the fabric environment to be SSHable The object is a docker.models.containers.Container object.

From here, users should be able to exec into the container to check things like the image files and such.

Note: This should work for docker-machine or docker

from fabric.api import execute

from .fabric_tasks import create_readme

def test_fabric_task_executes(fabric_host):
    ls_results = fabric_host.exec_run('ls /tmp/')
    assert ls_results[1].strip() == 'README.rst'

Note: pytest-capture does not like when we try to actually write to stdout like in fabric so make sure to add -s to your pytest args

Project details

Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
pytest-fabric-1.0.0.tar.gz (3.7 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page