feat: add Nailong Fund advisor capabilities
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import pytest
|
||||
|
||||
from app.core.cursor import MAX_CURSOR_VALUE, parse_cursor
|
||||
from app.core.errors import InvalidCursorError
|
||||
|
||||
|
||||
@pytest.mark.parametrize("raw", [None, "", " "])
|
||||
def test_empty_cursor_means_first_page(raw: str | None) -> None:
|
||||
assert parse_cursor(raw) is None
|
||||
|
||||
|
||||
@pytest.mark.parametrize("raw", ["1", str(MAX_CURSOR_VALUE)])
|
||||
def test_decimal_cursor_is_accepted(raw: str) -> None:
|
||||
assert parse_cursor(raw) == int(raw)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("raw", ["0", "-1", "+1", "1.0", "abc", "1" * 20])
|
||||
def test_invalid_cursor_is_rejected(raw: str) -> None:
|
||||
with pytest.raises(InvalidCursorError):
|
||||
parse_cursor(raw)
|
||||
@@ -0,0 +1,15 @@
|
||||
from app.core.config import Settings
|
||||
|
||||
|
||||
def test_sales_institution_supports_unicode_escaped_environment_value() -> None:
|
||||
settings = Settings.model_validate({
|
||||
"jwt_issuer": "test-issuer",
|
||||
"jwt_audience": "test-audience",
|
||||
"mysql_dsn": "mysql+asyncmy://user:pass@localhost:3306/test",
|
||||
"redis_url": "redis://localhost:6379/0",
|
||||
"milvus_uri": "http://localhost:19530",
|
||||
"neo4j_uri": "bolt://localhost:7687",
|
||||
"product_suitability_sales_institution": "\\u5357\\u65b9\\u57fa\\u91d1",
|
||||
})
|
||||
|
||||
assert settings.product_suitability_sales_institution == "南方基金"
|
||||
Reference in New Issue
Block a user