WIP: Mention that we should raise a CalledProcessError here
This commit is contained in:
parent
d969ce5242
commit
32032de81d
@ -2,6 +2,7 @@
|
||||
Tests for /list route
|
||||
'''
|
||||
from types import SimpleNamespace
|
||||
from subprocess import CalledProcessError
|
||||
|
||||
|
||||
_PF_TABLE_LIST = b''' 192.0.2.66
|
||||
@ -93,6 +94,8 @@ def test_list_nonexistent_table(client, mocker, valid_credentials):
|
||||
run_res.returncode = 255
|
||||
run_res.check_returncode = noop
|
||||
|
||||
# XXX raise a CalledProcessError here...
|
||||
|
||||
mocker.patch('jail2ban.pfctl.run', return_value=run_res)
|
||||
|
||||
response = client.get("/list/nonexistent",
|
||||
|
Loading…
x
Reference in New Issue
Block a user