Create a worker for testing.
(self)
| 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.""" |