コード例 #1
0
def test_check_service_path_empty(mock_isdir, mock_stdout):
    mock_isdir.return_value = True
    service_path = "fake/path"
    assert not check_service_path(service_path)

    output = mock_stdout.getvalue()
    assert "%s does not contain any .yaml files" % service_path in output
コード例 #2
0
def test_check_service_path_good(
    mock_glob,
    mock_isdir
):
    mock_isdir.return_value = True
    mock_glob.return_value = True
    service_path = 'fake/path'
    assert check_service_path(service_path)
コード例 #3
0
def test_check_service_path_none(
    mock_stdout
):
    service_path = None
    assert not check_service_path(service_path)

    output = mock_stdout.getvalue()
    assert "%s is not a directory" % service_path in output
コード例 #4
0
ファイル: test_cmds_validate.py プロジェクト: pathcl/paasta
def test_check_service_path_good(mock_glob, mock_isdir):
    mock_isdir.return_value = True
    mock_glob.return_value = True
    service_path = 'fake/path'
    assert check_service_path(service_path)
コード例 #5
0
ファイル: test_cmds_validate.py プロジェクト: pathcl/paasta
def test_check_service_path_none(mock_stdout):
    service_path = None
    assert not check_service_path(service_path)

    output = mock_stdout.getvalue()
    assert "%s is not a directory" % service_path in output
コード例 #6
0
def test_check_service_path_none(capsys):
    service_path = None
    assert not check_service_path(service_path)

    output, _ = capsys.readouterr()
    assert "%s is not a directory" % service_path in output