From c796d73fc393cb744d7553157f5b36b474be57ca Mon Sep 17 00:00:00 2001 From: Hasan Ramezani Date: Sun, 7 Oct 2018 00:14:37 +0200 Subject: [PATCH] Add test for `config.from_object`. --- tests/test_config.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_config.py b/tests/test_config.py index 14b28d46..08461b81 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -89,6 +89,16 @@ def test_overwrite_exisiting_config(app): assert app.config.DEFAULT == 2 +def test_overwrite_exisiting_config_ignore_lowercase(app): + app.config.default = 1 + + class Config: + default = 2 + + app.config.from_object(Config) + assert app.config.default == 1 + + def test_missing_config(app): with pytest.raises(AttributeError) as e: app.config.NON_EXISTENT