diff --git a/tests/test_config.py b/tests/test_config.py index 67126f087..007ef75a1 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -48,6 +48,20 @@ def test_debug_app(): assert isinstance(config.loaded_app, DebugMiddleware) +@pytest.mark.parametrize( + "app, expected_should_reload", + [(asgi_app, False), ("tests.test_config:asgi_app", True)], +) +def test_config_should_reload_is_set(app, expected_should_reload): + config_debug = Config(app=app, debug=True) + assert config_debug.debug is True + assert config_debug.should_reload is expected_should_reload + + config_reload = Config(app=app, reload=True) + assert config_reload.reload is True + assert config_reload.should_reload is expected_should_reload + + def test_wsgi_app(): config = Config(app=wsgi_app, interface="wsgi", proxy_headers=False) config.load()