Raise CalledProcessError as side effect
This commit is contained in:
parent
32032de81d
commit
d43a574579
@ -94,9 +94,13 @@ def test_list_nonexistent_table(client, mocker, valid_credentials):
|
|||||||
run_res.returncode = 255
|
run_res.returncode = 255
|
||||||
run_res.check_returncode = noop
|
run_res.check_returncode = noop
|
||||||
|
|
||||||
# XXX raise a CalledProcessError here...
|
mocker.patch('jail2ban.pfctl.run',
|
||||||
|
return_value=run_res,
|
||||||
mocker.patch('jail2ban.pfctl.run', return_value=run_res)
|
side_effect=CalledProcessError(run_res.returncode,
|
||||||
|
'foobar',
|
||||||
|
output=run_res.stdout,
|
||||||
|
stderr=run_res.stderr)
|
||||||
|
)
|
||||||
|
|
||||||
response = client.get("/list/nonexistent",
|
response = client.get("/list/nonexistent",
|
||||||
headers={"Authorization":
|
headers={"Authorization":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user