def METHOD_NAME(monkeypatch):
    # given
    invalid_response_mock = Mock()
    invalid_response_mock.headers = {"content-type": "application/json"}
    monkeypatch.setattr(
        HTTPSession,
        "request",
        Mock(return_value=invalid_response_mock),
    )
    field = "image"
    dummy_url = "http://example.com/invalid_url.json"
    # 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."