forked from orbit-oss/flask
same blueprint cannot be registered with same name
This commit is contained in:
parent
f8cdc78ce1
commit
48f2afbf90
3 changed files with 10 additions and 18 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue