release: bump version to 0.3.0
- Refactor Redis backend connection handling and pool management - Update algorithm implementations with improved type annotations - Enhance config loader validation with stricter Pydantic schemas - Improve decorator and middleware error handling - Expand example scripts with better docstrings and usage patterns - Add new 00_basic_usage.py example for quick start - Reorganize examples directory structure - Fix type annotation inconsistencies across core modules - Update dependencies in pyproject.toml
This commit is contained in:
@@ -86,7 +86,9 @@ class TestConfigLoaderEnv:
|
||||
"FASTAPI_TRAFFIC_RATE_LIMIT_WINDOW_SIZE": "60.0",
|
||||
}
|
||||
|
||||
with pytest.raises(ConfigurationError, match="Required field 'limit'"):
|
||||
with pytest.raises(
|
||||
ConfigurationError, match="Invalid value for 'limit': Field required"
|
||||
):
|
||||
loader.load_rate_limit_config_from_env(env_vars)
|
||||
|
||||
def test_load_rate_limit_config_from_env_with_overrides(
|
||||
@@ -351,7 +353,9 @@ class TestConfigLoaderJson:
|
||||
config_data = {"window_size": 60.0}
|
||||
json_file.write_text(json.dumps(config_data))
|
||||
|
||||
with pytest.raises(ConfigurationError, match="Required field 'limit'"):
|
||||
with pytest.raises(
|
||||
ConfigurationError, match="Invalid value for 'limit': Field required"
|
||||
):
|
||||
loader.load_rate_limit_config_from_json(json_file)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user