diff options
| author | Dennis Fink | 2026-11-12 22:56:07 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-11-12 22:56:07 +0100 |
| commit | a10b29ac98ba535a5c2f9697c54265edd2c84a78 (patch) | |
| tree | f116a58be6e241a11d283683070ebb18c96aa8e4 /tests/test_config.py | |
| parent | 1db6b47f88dde5538efa433328987c70eab74d70 (diff) | |
| download | webmentions-ssg-a10b29ac98ba535a5c2f9697c54265edd2c84a78.tar.gz webmentions-ssg-a10b29ac98ba535a5c2f9697c54265edd2c84a78.zip | |
refactor(core): use lowercase extension names
Rename shared Flask extension singletons to conventional lowercase names
and update imports throughout the application and tests to remove
redundant aliases.
Diffstat (limited to 'tests/test_config.py')
| -rw-r--r-- | tests/test_config.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_config.py b/tests/test_config.py index 599c930..4a59236 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -12,7 +12,7 @@ from flask_limiter.util import get_remote_address from wtforms import Field, ValidationError from wtforms.form import BaseForm -from webmentions_ssg import LIMITER, create_app +from webmentions_ssg import create_app, limiter from webmentions_ssg.config import ( DefaultConfig, DevelopmentConfig, @@ -235,7 +235,7 @@ def test_production_rejects_ephemeral_or_discarding_huey_queue( def test_production_prefers_explicit_huey_url_over_legacy_option( tmp_path: Path, monkeypatch: pytest.MonkeyPatch ) -> None: - monkeypatch.setattr(LIMITER, "init_app", lambda app: None) + monkeypatch.setattr(limiter, "init_app", lambda app: None) config_path = tmp_path / "production.cfg" config_path.write_text("# Configuration inherited from subclass.\n") @@ -300,7 +300,7 @@ def test_production_uses_persistent_configured_secret( tmp_path: Path, monkeypatch: pytest.MonkeyPatch ) -> None: # The test concerns secret-key persistence, not Redis initialization. - monkeypatch.setattr(LIMITER, "init_app", lambda app: None) + monkeypatch.setattr(limiter, "init_app", lambda app: None) config_file = tmp_path / "production.cfg" key = "a-fixed-key-with-32-plus-random-characters" config_file.write_text(f"SECRET_KEY = {key!r}\n") @@ -325,7 +325,7 @@ def test_production_accepts_environment_secret_override( key = "another-long-persistent-secret-for-a-deployment" monkeypatch.setenv("WEBMENTIONS_SSG_SECRET_KEY", key) # Avoid requiring the optional Redis dependency for this configuration test. - monkeypatch.setattr(LIMITER, "init_app", lambda app: None) + monkeypatch.setattr(limiter, "init_app", lambda app: None) class EnvConfiguredProduction(ProductionConfig): CONFIG_FILE = str(config_file) |
