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

Method create_worker

tests/test_gtornado.py:272–286  ·  view source on GitHub ↗

Create a worker for testing.

(self)

Source from the content-addressed store, hash-verified

270 """Tests for app wrapping logic."""
271
272 def create_worker(self):
273 """Create a worker for testing."""
274 cfg = Config()
275 cfg.set('workers', 1)
276
277 worker = gtornado.TornadoWorker(
278 age=1,
279 ppid=os.getpid(),
280 sockets=[],
281 app=mock.Mock(),
282 timeout=30,
283 cfg=cfg,
284 log=mock.Mock(),
285 )
286 return worker
287
288 def test_wsgi_callable_wrapped_in_container(self):
289 """Test that a plain WSGI callable gets wrapped in WSGIContainer."""

Callers

nothing calls this directly

Calls 2

setMethod · 0.95
ConfigClass · 0.90

Tested by

no test coverage detected