WIP: Mention that we should raise a CalledProcessError here

This commit is contained in:
Ruben van Staveren 2023-01-14 19:52:32 +01:00
parent d969ce5242
commit 32032de81d
Signed by: ruben
GPG Key ID: 886F6BECD477A93F

View File

@ -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",