diff options
Diffstat (limited to '')
| -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) |
