forked from orbit-oss/flask
Make test more idiomatic
This commit is contained in:
parent
d0e2e7b66c
commit
6f7847e3c4
1 changed files with 1 additions and 4 deletions
|
|
@ -800,11 +800,8 @@ def test_baseexception_error_handling():
|
|||
raise KeyboardInterrupt()
|
||||
|
||||
with app.test_client() as c:
|
||||
try:
|
||||
with pytest.raises(KeyboardInterrupt):
|
||||
c.get('/')
|
||||
raise AssertionError("KeyboardInterrupt should have been raised")
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
|
||||
ctx = flask._request_ctx_stack.top
|
||||
assert ctx.preserved
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue