Add configurable data providers and localize frontend UI
This commit is contained in:
15
backend/tests/test_provider_utils.py
Normal file
15
backend/tests/test_provider_utils.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""Tests for market symbol normalization helpers."""
|
||||
|
||||
from backend.data.provider_utils import describe_symbol, normalize_symbol
|
||||
|
||||
|
||||
def test_normalize_symbol_exchange_prefix():
|
||||
assert normalize_symbol("sh600519") == "600519"
|
||||
assert normalize_symbol("600519.SH") == "600519"
|
||||
|
||||
|
||||
def test_normalize_symbol_us_ticker():
|
||||
symbol = describe_symbol("aapl")
|
||||
assert symbol.canonical == "AAPL"
|
||||
assert symbol.market == "us"
|
||||
Reference in New Issue
Block a user