mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-31 22:41:19 +00:00
* merge branch develop with main * bump desktop version * fix the merge * sync Cargo.lock to desktop 2.0.0 * fix cli conftest.py --------- Co-authored-by: deeleeramone <>
17 lines
571 B
Python
17 lines
571 B
Python
"""Unit tests for ``openbb_sec.models.symbol_map``."""
|
|
|
|
import asyncio
|
|
|
|
import pytest
|
|
from openbb_core.app.model.abstract.error import OpenBBError
|
|
|
|
from openbb_sec.models.symbol_map import SecSymbolMapFetcher, SecSymbolMapQueryParams
|
|
|
|
|
|
def test_symbol_map_aextract_invalid_cik():
|
|
"""symbol_map.py:57 -> raise OpenBBError when query is not a digit."""
|
|
query = SecSymbolMapQueryParams(query="NOTACIK")
|
|
with pytest.raises(OpenBBError) as exc:
|
|
asyncio.run(SecSymbolMapFetcher.aextract_data(query, None))
|
|
assert "must be a valid CIK" in str(exc.value)
|