def METHOD_NAME(monkeypatch):
    # given
    invalid_response_mock = Mock()
    invalid_response_mock.headers = {}
    monkeypatch.setattr(
        HTTPSession,
        "request",
        Mock(return_value=invalid_response_mock),
    )
    field = "image"
    dummy_url = "http://example.com/broken_url"
    # when
    with pytest.raises(ValidationError) as exc:
        validate_image_url(
            dummy_url,
            field,
            ProductErrorCode.INVALID.value,
        )
    # then
    assert exc.value.args[0][field].message == "Invalid file type."