mirror of
https://github.com/httpie/cli.git
synced 2025-01-05 22:53:32 +02:00
Clean-up
This commit is contained in:
parent
e9aba543b1
commit
6267f21f21
@ -7,14 +7,14 @@ from utils import TestEnvironment, http, HTTP_OK
|
||||
def test_keyboard_interrupt_during_arg_parsing_exit_status(httpbin):
|
||||
with mock.patch('httpie.cli.parser.parse_args',
|
||||
side_effect=KeyboardInterrupt()):
|
||||
r = http('GET', httpbin.url + '/status/200', error_exit_ok=True)
|
||||
r = http('GET', httpbin.url + '/get', error_exit_ok=True)
|
||||
assert r.exit_status == ExitStatus.ERROR_CTRL_C
|
||||
|
||||
|
||||
def test_keyboard_interrupt_in_program_exit_status(httpbin):
|
||||
with mock.patch('httpie.core.program',
|
||||
side_effect=KeyboardInterrupt()):
|
||||
r = http('GET', httpbin.url + '/status/200', error_exit_ok=True)
|
||||
r = http('GET', httpbin.url + '/get', error_exit_ok=True)
|
||||
assert r.exit_status == ExitStatus.ERROR_CTRL_C
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user