from typing import Any
from unittest.mock import Mock
import requests


def altinn_effect_xml_error(*args: Any, **kwargs: Any) -> Mock:
    """Create mocked altinn response."""
    rsp = Mock(spec=requests.Response)
    rsp.status_code = 200
    rsp.raise_for_status.return_value = None
    rsp.content.read.return_value = (
        """<?xml version="1.0" encoding="UTF-8" ?><test """.encode()
    )
    return rsp