Example #1
0
def test_pull_docker_image_exists_with_failure(mock_run):
    with raises(SystemExit) as excinfo:
        docker_pull_image('fake_image')
    assert excinfo.value.code == 42
    mock_run.assert_called_once_with('docker pull fake_image',
                                     stream=True,
                                     stdin=mock.ANY)
Example #2
0
def test_pull_docker_image_exists_with_failure(mock_run):
    with raises(SystemExit) as excinfo:
        docker_pull_image('fake_image')
    assert excinfo.value.code == 42
    mock_run.assert_called_once_with('docker pull fake_image', stream=True, stdin=mock.ANY)
Example #3
0
def test_pull_image_runs_docker_pull(mock_run):
    docker_pull_image('fake_image')
    mock_run.assert_called_once_with('docker pull fake_image', stream=True, stdin=mock.ANY)
Example #4
0
def test_pull_image_runs_docker_pull(mock_run):
    docker_pull_image('fake_image')
    mock_run.assert_called_once_with('docker pull fake_image', stream=True, stdin=mock.ANY)