From 32032de81da28ef2634055c9007dda8329804fdb Mon Sep 17 00:00:00 2001 From: Ruben van Staveren Date: Sat, 14 Jan 2023 19:52:32 +0100 Subject: [PATCH] WIP: Mention that we should raise a CalledProcessError here --- tests/test_list.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_list.py b/tests/test_list.py index 6978ef4..b7365c4 100644 --- a/tests/test_list.py +++ b/tests/test_list.py @@ -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",