Test that os.kill() is called

This commit is contained in:
Berker Peksag 2017-07-12 17:54:26 +03:00
parent b64c7fa305
commit 2b7b63ae58

View File

@ -35,6 +35,7 @@ def test_validate_no_file(_open):
def test_validate_file_pid_exists(kill, _open):
pidfile = gunicorn.pidfile.Pidfile('test.pid')
assert pidfile.validate() == 1
assert kill.called
@mock.patch(builtin('open'), new_callable=mock.mock_open, read_data='a')