def tests_validate_search_no_types():
    """Test validation of an empty value for search_object types."""
    payload = {"search_input": "The input"}
    result = validate_search_payload(payload)
    assert result["errors"] == "No search_object_types for search received."
def test_validate_search_no_query():
    """Test validation of an empty value for search query."""
    result = validate_search_payload(None)
    assert result["errors"] == "No query parameter received."
def test_validate_search_no_input():
    """Test validation of an empty value for search_input."""
    payload = {"search_object_types": []}
    result = validate_search_payload(payload)
    assert result["errors"] == "No search_input string for search received."
def test_validate_search():
    """Test validate_search_payload works with a good payload."""
    payload = {"search_input": "The input", "search_object_types": []}
    result = validate_search_payload(payload)
    assert result == {}