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
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)
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
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)
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
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