Exemplo n.º 1
0
def test_check_docker_check_file_not_found(mock_is_file_in_dir, capfd):
    mock_is_file_in_dir.return_value = False

    docker_check()

    output, _ = capfd.readouterr()
    assert PaastaCheckMessages.DOCKERFILE_MISSING in output
Exemplo n.º 2
0
def test_check_docker_exists_and_is_valid(mock_is_file_in_dir, capfd):
    mock_is_file_in_dir.return_value = "/fake/path"

    docker_check()

    output, _ = capfd.readouterr()
    assert PaastaCheckMessages.DOCKERFILE_FOUND in output
Exemplo n.º 3
0
def test_check_docker_check_file_not_found(mock_stdout, mock_is_file_in_dir):
    mock_is_file_in_dir.return_value = False

    docker_check()
    output = mock_stdout.getvalue()

    assert PaastaCheckMessages.DOCKERFILE_MISSING in output
Exemplo n.º 4
0
def test_check_docker_check_file_not_found(
    mock_stdout,
    mock_is_file_in_dir
):
    mock_is_file_in_dir.return_value = False

    docker_check()
    output = mock_stdout.getvalue()

    assert PaastaCheckMessages.DOCKERFILE_MISSING in output
Exemplo n.º 5
0
def test_check_docker_exists_and_is_valid(
    mock_stdout,
    mock_is_file_in_dir,
):
    mock_is_file_in_dir.return_value = "/fake/path"

    docker_check()
    output = mock_stdout.getvalue()

    assert PaastaCheckMessages.DOCKERFILE_FOUND in output
Exemplo n.º 6
0
def test_check_docker_exists_and_is_valid(
    mock_stdout,
    mock_is_file_in_dir,
):
    mock_is_file_in_dir.return_value = "/fake/path"

    docker_check()
    output = mock_stdout.getvalue()

    assert PaastaCheckMessages.DOCKERFILE_FOUND in output