Article title
CONTACT
import asyncio import gzip from datetime import date import openbb_core.provider.utils.helpers as core_helpers import pytest from openbb_core.app.model.abstract.error import OpenBBError from openbb_ecb.utils import non_sdmx class _FakeResp: def __init__(self, status=200, text="", raw=b""): self.status = status self._text = text self._raw = raw async def text(self): return self._text async def read(self): return self._raw def test_strip_html(): assert non_sdmx._strip_html("a b\n c") == "a b c" def test_parse_ea_date(): assert non_sdmx._parse_ea_date("15/12/2026 00:00:00") == "2026-12-15" assert non_sdmx._parse_ea_date("bad") is None def test_article_to_html(): base = "https://www.ecb.europa.eu/press/blog/x.en.html" html = ( "
" '' "" "CONTACT