Merge pull request #4613 from citramon/test_for_from_mapping_config_skip_not_upper

Add test config.from_mapping method: ignoring items with non-upper keys
This commit is contained in:
David Lord 2022-05-31 09:10:36 -07:00 committed by GitHub
commit c6e3fc8072
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -113,6 +113,10 @@ def test_config_from_mapping():
app.config.from_mapping(SECRET_KEY="config", TEST_KEY="foo")
common_object_test(app)
app = flask.Flask(__name__)
app.config.from_mapping(SECRET_KEY="config", TEST_KEY="foo", skip_key="skip")
common_object_test(app)
app = flask.Flask(__name__)
with pytest.raises(TypeError):
app.config.from_mapping({}, {})