Exemple #1
0
def test_docker_run():
    docker = DockerClient()
    docker.stop_all()
    docker.run('selenium/hub:2.53.0',
               bind_ports={4444: 4444},
               name='selenium-hub')
    docker.run('selenium/node-firefox:2.53.0', links={'selenium-hub': 'hub'})
    containers = docker.get_running_containers()
    assert len(containers) >= 2
    docker.stop_all()
    assert len(docker.get_running_containers()) == 0
Exemple #2
0
def test_docker_get_running_containers():
    docker = DockerClient()
    print(docker.get_running_containers())