예제 #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')
예제 #2
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')