Add configurable data providers and localize frontend UI

This commit is contained in:
2026-03-15 00:55:12 +08:00
parent 12de93aa30
commit d233a3f55d
38 changed files with 1936 additions and 1038 deletions

View 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"