same blueprint cannot be registered with same name

This commit is contained in:
David Lord 2021-11-12 09:37:13 -08:00
parent f8cdc78ce1
commit 48f2afbf90
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
3 changed files with 10 additions and 18 deletions

View file

@ -954,8 +954,8 @@ def test_unique_blueprint_names(app, client) -> None:
app.register_blueprint(bp)
with pytest.warns(UserWarning):
app.register_blueprint(bp) # same bp, same name, warning
with pytest.raises(ValueError):
app.register_blueprint(bp) # same bp, same name, error
app.register_blueprint(bp, name="again") # same bp, different name, ok