MCPcopy
hub / github.com/benoitc/gunicorn / test_reopen

Method test_reopen

tests/ctl/test_handlers.py:371–380  ·  view source on GitHub ↗

Test reopen command.

(self)

Source from the content-addressed store, hash-verified

369 """Tests for reopen command."""
370
371 def test_reopen(self):
372 """Test reopen command."""
373 arbiter = MockArbiter()
374 handlers = CommandHandlers(arbiter)
375
376 with patch('os.kill') as mock_kill:
377 result = handlers.reopen()
378
379 assert result["status"] == "reopening"
380 mock_kill.assert_called_once_with(12345, signal.SIGUSR1)
381
382
383class TestShutdown:

Callers

nothing calls this directly

Calls 3

reopenMethod · 0.95
CommandHandlersClass · 0.90
MockArbiterClass · 0.70

Tested by

no test coverage detected